/**
 * Given a list of names, replace all occurrences of a search element with a replacement element and return the modified list
 */
fun replaceElements(names: MutableList<String>, searchElement: String, replacementElement: String): MutableList<String> {

    // Find the index of the search element in the list
    val index = names.indexOf(searchElement)

    // Replace the element at that index with the replacement element
    names[index] = replacementElement

    // Return the modified list
    return names
}
/**
 * Given a list of names, replace all occurrences of a search element with a replacement element and return the modified list
 */
fun replaceElements(names: MutableList<String>, searchElement: String, replacementElement: String): MutableList<String> {
/**
 * Given a list of names, replace all occurrences of a search element with a replacement element and return the modified list
 */
fun replaceElements(names: MutableList<String>, searchElement: String, replacementElement: String): MutableList<String> {

    // Find the index of the search element in the list
    val index = names.indexOf(searchElement)

    // Replace the element at that index with the replacement element
    names[index] = replacementElement

    // Return the modified list
    return names
}