/**
 * This function takes a matrix (2D list) and a target element as input. It should return a Pair containing the row and column indices of the target element in the matrix.
 * If the target element is not found in the matrix, it should return Pair(-1, -1).
 */
fun findElement(matrix: List<List<Int>>, target: Int): Pair<Int, Int> {

    for (i in matrix.indices) {
        try {
            val j = matrix[i].indexOf(target)
            return Pair(i, j)
        } catch (e: NoSuchElementException) {
            // Element not found in current row
        }
    }
    return Pair(-1, -1)
}
/**
 * This function takes a matrix (2D list) and a target element as input. It should return a Pair containing the row and column indices of the target element in the matrix.
 * If the target element is not found in the matrix, it should return Pair(-1, -1).
 */
fun findElement(matrix: List<List<Int>>, target: Int): Pair<Int, Int> {
/**
 * This function takes a matrix (2D list) and a target element as input. It should return a Pair containing the row and column indices of the target element in the matrix.
 * If the target element is not found in the matrix, it should return Pair(-1, -1).
 */
fun findElement(matrix: List<List<Int>>, target: Int): Pair<Int, Int> {

    for (i in matrix.indices) {
        try {
            val j = matrix[i].indexOf(target)
            return Pair(i, j)
        } catch (e: NoSuchElementException) {
            // Element not found in current row
        }
    }
    return Pair(-1, -1)
}