/**
 * Given two iterables, find the indices where they have common elements.
 *
 * @param iterable1 The first iterable.
 * @param iterable2 The second iterable.
 * @return A list of indices where both iterables have common elements.
 */
fun findCommonIndices(iterable1: Iterable<Any>, iterable2: Iterable<Any>): List<Int> {

    val commonIndices = mutableListOf<Int>()
    for ((index, element) in iterable1.withIndex()) {
        if (element in iterable2) {
            commonIndices.add(index)
        }
    }
    return commonIndices
}
/**
 * Given two iterables, find the indices where they have common elements.
 *
 * @param iterable1 The first iterable.
 * @param iterable2 The second iterable.
 * @return A list of indices where both iterables have common elements.
 */
fun findCommonIndices(iterable1: Iterable<Any>, iterable2: Iterable<Any>): List<Int> {
/**
 * Given two iterables, find the indices where they have common elements.
 *
 * @param iterable1 The first iterable.
 * @param iterable2 The second iterable.
 * @return A list of indices where both iterables have common elements.
 */
fun findCommonIndices(iterable1: Iterable<Any>, iterable2: Iterable<Any>): List<Int> {

    val commonIndices = mutableListOf<Int>()
    for ((index, element) in iterable1.withIndex()) {
        if (element in iterable2) {
            commonIndices.add(index)
        }
    }
    return commonIndices
}