/**
 * This function takes a list of numbers as input and returns the index of the first occurrence of the target number.
 * If the target number is not found in the list, it returns -1.
 */
fun indexListOfNumbers(numbers: List<Int>, target: Int): Int {

    if (numbers.isEmpty()) {
        return -1
    }

    var start = 0
    var end = numbers.size - 1

    while (start <= end) {
        val mid = (start + end) / 2

        if (numbers[mid] == target) {
            return mid
        }

        if (numbers[start] <= target && target < numbers[mid]) {
            end = mid - 1
        } else if (numbers[mid] < target && target <= numbers[end]) {
            start = mid + 1
        }
    }

    return -1
}
/**
 * This function takes a list of numbers as input and returns the index of the first occurrence of the target number.
 * If the target number is not found in the list, it returns -1.
 */
fun indexListOfNumbers(numbers: List<Int>, target: Int): Int {
/**
 * This function takes a list of numbers as input and returns the index of the first occurrence of the target number.
 * If the target number is not found in the list, it returns -1.
 */
fun indexListOfNumbers(numbers: List<Int>, target: Int): Int {

    if (numbers.isEmpty()) {
        return -1
    }

    var start = 0
    var end = numbers.size - 1

    while (start <= end) {
        val mid = (start + end) / 2

        if (numbers[mid] == target) {
            return mid
        }

        if (numbers[start] <= target && target < numbers[mid]) {
            end = mid - 1
        } else if (numbers[mid] < target && target <= numbers[end]) {
            start = mid + 1
        }
    }

    return -1
}