/**
 * This function takes a number line and a value as input and returns the index at which the value occurs in the number line.
 * If the value is not present in the number line, it returns -1.
 *
 * @param numberLine A list containing the elements of the number line.
 * @param value The value to be searched for in the number line.
 * @return The index of the value in the number line if found, -1 otherwise.
 */
fun findIndex(numberLine: List<Int>, value: Int): Int {

    // Iterate through the number line to find the index of the value
    for (i in numberLine.indices) {
        if (numberLine[i] == value) {
            return i
        }
    }
    
    // If the value is not found, return -1
    return -1
}
/**
 * This function takes a number line and a value as input and returns the index at which the value occurs in the number line.
 * If the value is not present in the number line, it returns -1.
 *
 * @param numberLine A list containing the elements of the number line.
 * @param value The value to be searched for in the number line.
 * @return The index of the value in the number line if found, -1 otherwise.
 */
fun findIndex(numberLine: List<Int>, value: Int): Int {
/**
 * This function takes a number line and a value as input and returns the index at which the value occurs in the number line.
 * If the value is not present in the number line, it returns -1.
 *
 * @param numberLine A list containing the elements of the number line.
 * @param value The value to be searched for in the number line.
 * @return The index of the value in the number line if found, -1 otherwise.
 */
fun findIndex(numberLine: List<Int>, value: Int): Int {

    // Iterate through the number line to find the index of the value
    for (i in numberLine.indices) {
        if (numberLine[i] == value) {
            return i
        }
    }
    
    // If the value is not found, return -1
    return -1
}