/**
 * This function finds the common imaginary part among all the complex numbers in the list.
 *
 * @param complexNumList list of complex numbers.
 * @return commonImaginaryPart the common imaginary part.
 */
fun findCommonImaginaryPart(complexNumList: List<Pair<Int, Int>>): List<Int> {

    // Extract imaginary parts from the complex numbers
    val imaginaryParts = complexNumList.map { it.second }

    // Find the common imaginary part using list comprehension
    val commonImaginaryPart = imaginaryParts.filter { imag -> imaginaryParts.count { it == imag } == complexNumList.size }

    return commonImaginaryPart
}
/**
 * This function finds the common imaginary part among all the complex numbers in the list.
 *
 * @param complexNumList list of complex numbers.
 * @return commonImaginaryPart the common imaginary part.
 */
fun findCommonImaginaryPart(complexNumList: List<Pair<Int, Int>>): List<Int> {
/**
 * This function finds the common imaginary part among all the complex numbers in the list.
 *
 * @param complexNumList list of complex numbers.
 * @return commonImaginaryPart the common imaginary part.
 */
fun findCommonImaginaryPart(complexNumList: List<Pair<Int, Int>>): List<Int> {

    // Extract imaginary parts from the complex numbers
    val imaginaryParts = complexNumList.map { it.second }

    // Find the common imaginary part using list comprehension
    val commonImaginaryPart = imaginaryParts.filter { imag -> imaginaryParts.count { it == imag } == complexNumList.size }

    return commonImaginaryPart
}