/**
 * Given two arrays, find the common indices where the elements are both positive and greater than 5.
 *
 * @param array1 The first array.
 * @param array2 The second array.
 * @return A list of common indices where the elements satisfy the above conditions.
 */
fun findCommonIndices(array1: List<Int>, array2: List<Int>): List<Int> {

    val commonIndices = mutableListOf<Int>()

    // Iterate over the indices of the arrays using zip and check the conditions
    for ((index, pair) in array1.zip(array2).withIndex()) {
        val (element1, element2) = pair
        if (element1 > 5 && element2 > 5) {
            commonIndices.add(index)
        }
    }

    return commonIndices
}
/**
 * Given two arrays, find the common indices where the elements are both positive and greater than 5.
 *
 * @param array1 The first array.
 * @param array2 The second array.
 * @return A list of common indices where the elements satisfy the above conditions.
 */
fun findCommonIndices(array1: List<Int>, array2: List<Int>): List<Int> {
/**
 * Given two arrays, find the common indices where the elements are both positive and greater than 5.
 *
 * @param array1 The first array.
 * @param array2 The second array.
 * @return A list of common indices where the elements satisfy the above conditions.
 */
fun findCommonIndices(array1: List<Int>, array2: List<Int>): List<Int> {

    val commonIndices = mutableListOf<Int>()

    // Iterate over the indices of the arrays using zip and check the conditions
    for ((index, pair) in array1.zip(array2).withIndex()) {
        val (element1, element2) = pair
        if (element1 > 5 && element2 > 5) {
            commonIndices.add(index)
        }
    }

    return commonIndices
}