/**
 * This function takes a chef name and a target character as input and returns the index of the last occurrence of the
 * target character in the chef name.
 *
 * @param chefName A string representing the chef name
 * @param targetChar A character to find
 * @return The index of the last occurrence of the target character in the chef name, -1 if not found
 */
fun findLastOccurrence(chefName: String, targetChar: Char): Int {

    var lastIndex = -1
    var index = 0

    while (index < chefName.length) {
        if (chefName[index] == targetChar) {
            lastIndex = index
        }
        index++
    }

    return lastIndex
}
/**
 * This function takes a chef name and a target character as input and returns the index of the last occurrence of the
 * target character in the chef name.
 *
 * @param chefName A string representing the chef name
 * @param targetChar A character to find
 * @return The index of the last occurrence of the target character in the chef name, -1 if not found
 */
fun findLastOccurrence(chefName: String, targetChar: Char): Int {
/**
 * This function takes a chef name and a target character as input and returns the index of the last occurrence of the
 * target character in the chef name.
 *
 * @param chefName A string representing the chef name
 * @param targetChar A character to find
 * @return The index of the last occurrence of the target character in the chef name, -1 if not found
 */
fun findLastOccurrence(chefName: String, targetChar: Char): Int {

    var lastIndex = -1
    var index = 0

    while (index < chefName.length) {
        if (chefName[index] == targetChar) {
            lastIndex = index
        }
        index++
    }

    return lastIndex
}