/**
 * This function performs a linear search on a given array to find a target value.
 *
 * @param array A list of integers.
 * @param target The integer value to search for.
 * @return The index of the target value in the array, or -1 if it is not present.
 */
fun linearSearch(array: List<Int>, target: Int): Int {

    var index = 0

    while (index < array.size) {
        if (array[index] == target) {
            return index
        }
        index++
    }

    return -1
}
/**
 * This function performs a linear search on a given array to find a target value.
 *
 * @param array A list of integers.
 * @param target The integer value to search for.
 * @return The index of the target value in the array, or -1 if it is not present.
 */
fun linearSearch(array: List<Int>, target: Int): Int {
/**
 * This function performs a linear search on a given array to find a target value.
 *
 * @param array A list of integers.
 * @param target The integer value to search for.
 * @return The index of the target value in the array, or -1 if it is not present.
 */
fun linearSearch(array: List<Int>, target: Int): Int {

    var index = 0

    while (index < array.size) {
        if (array[index] == target) {
            return index
        }
        index++
    }

    return -1
}