/**
 * Given two tuples 'a' and 'b' of equal length, compare each pair of corresponding elements
 * and return the index of the first tuple with a greater element, or -1 if they are equal.
 *
 * @param a First tuple containing elements to be compared.
 * @param b Second tuple containing elements to be compared.
 * @return Index of the first tuple with a greater element, or -1 if they are equal.
 */
fun compareTuples(a: List<Int>, b: List<Int>): Int {

    var index = 0
    for ((i, pair) in a.zip(b).withIndex()) {
        val (elemA, elemB) = pair
        if (elemA > elemB) {
            return index
        } else if (elemA < elemB) {
            return -1
        }
        index++
    }
    return -1
}
/**
 * Given two tuples 'a' and 'b' of equal length, compare each pair of corresponding elements
 * and return the index of the first tuple with a greater element, or -1 if they are equal.
 *
 * @param a First tuple containing elements to be compared.
 * @param b Second tuple containing elements to be compared.
 * @return Index of the first tuple with a greater element, or -1 if they are equal.
 */
fun compareTuples(a: List<Int>, b: List<Int>): Int {
/**
 * Given two tuples 'a' and 'b' of equal length, compare each pair of corresponding elements
 * and return the index of the first tuple with a greater element, or -1 if they are equal.
 *
 * @param a First tuple containing elements to be compared.
 * @param b Second tuple containing elements to be compared.
 * @return Index of the first tuple with a greater element, or -1 if they are equal.
 */
fun compareTuples(a: List<Int>, b: List<Int>): Int {

    var index = 0
    for ((i, pair) in a.zip(b).withIndex()) {
        val (elemA, elemB) = pair
        if (elemA > elemB) {
            return index
        } else if (elemA < elemB) {
            return -1
        }
        index++
    }
    return -1
}