/**
 * Given a list of photos and a target photo, this function finds the index of the target photo in the list.
 * If the target photo is not found, it returns -1.
 *
 * @param photoList A list of photo names (strings).
 * @param targetPhoto The name of the target photo (string).
 * @return The index of the target photo in the photoList or -1 if not found.
 */
fun findPhotoIndex(photoList: List<String>, targetPhoto: String): Int {

    var index = 0
    while (true) {
        if (index >= photoList.size) {
            return -1
        } else if (photoList[index] == targetPhoto) {
            return index
        }
        index++
    }
}
/**
 * Given a list of photos and a target photo, this function finds the index of the target photo in the list.
 * If the target photo is not found, it returns -1.
 *
 * @param photoList A list of photo names (strings).
 * @param targetPhoto The name of the target photo (string).
 * @return The index of the target photo in the photoList or -1 if not found.
 */
fun findPhotoIndex(photoList: List<String>, targetPhoto: String): Int {
/**
 * Given a list of photos and a target photo, this function finds the index of the target photo in the list.
 * If the target photo is not found, it returns -1.
 *
 * @param photoList A list of photo names (strings).
 * @param targetPhoto The name of the target photo (string).
 * @return The index of the target photo in the photoList or -1 if not found.
 */
fun findPhotoIndex(photoList: List<String>, targetPhoto: String): Int {

    var index = 0
    while (true) {
        if (index >= photoList.size) {
            return -1
        } else if (photoList[index] == targetPhoto) {
            return index
        }
        index++
    }
}