/**
 * Given two lists, return a list containing the indices of the common elements between them.
 */
fun findCommonElementIndices(list1: List<Any>, list2: List<Any>): List<Int> {

    val commonElementIndices = mutableListOf<Int>()

    for ((index, element) in list1.withIndex()) {
        if (element in list2 && element !in commonElementIndices) {
            commonElementIndices.add(index)
        }
    }

    return commonElementIndices
}
/**
 * Given two lists, return a list containing the indices of the common elements between them.
 */
fun findCommonElementIndices(list1: List<Any>, list2: List<Any>): List<Int> {
/**
 * Given two lists, return a list containing the indices of the common elements between them.
 */
fun findCommonElementIndices(list1: List<Any>, list2: List<Any>): List<Int> {

    val commonElementIndices = mutableListOf<Int>()

    for ((index, element) in list1.withIndex()) {
        if (element in list2 && element !in commonElementIndices) {
            commonElementIndices.add(index)
        }
    }

    return commonElementIndices
}