/**
 * This function finds and returns the index of a specific target item in a list.
 *
 * @param items A list of items.
 * @param target The item to look for in the list.
 * @return The index of the target item in the list.
 *
 * Example:
 * findIndex(listOf(1, 2, 3, 4, 5), 3) returns 2
 */
fun findIndex(items: List<Int>, target: Int): Int {

    var index = -1

    for (i in items.indices) {
        if (items[i] == target) {
            index = i
            break
        }
    }

    return index
}
/**
 * This function finds and returns the index of a specific target item in a list.
 *
 * @param items A list of items.
 * @param target The item to look for in the list.
 * @return The index of the target item in the list.
 *
 * Example:
 * findIndex(listOf(1, 2, 3, 4, 5), 3) returns 2
 */
fun findIndex(items: List<Int>, target: Int): Int {
/**
 * This function finds and returns the index of a specific target item in a list.
 *
 * @param items A list of items.
 * @param target The item to look for in the list.
 * @return The index of the target item in the list.
 *
 * Example:
 * findIndex(listOf(1, 2, 3, 4, 5), 3) returns 2
 */
fun findIndex(items: List<Int>, target: Int): Int {

    var index = -1

    for (i in items.indices) {
        if (items[i] == target) {
            index = i
            break
        }
    }

    return index
}