/**
 * Given a list of names and a keyword, this function removes any duplicate names that contain the keyword.
 * The function returns a new list with the duplicates removed.
 *
 * @param names a list of names
 * @param keyword a string to identify the duplicate names
 * @return a list with the duplicate names removed
 */
fun removeDuplicates(names: List<String>, keyword: String): List<String> {

    val newList = mutableListOf<String>()

    // Iterate through each name in the given list
    for (name in names) {
        // Use the AND operator to check if the current name contains the keyword and if it is not already in the new list
        if (name.contains(keyword) && !newList.contains(name)) {
            newList.add(name)
        }
    }

    return newList
}
/**
 * Given a list of names and a keyword, this function removes any duplicate names that contain the keyword.
 * The function returns a new list with the duplicates removed.
 *
 * @param names a list of names
 * @param keyword a string to identify the duplicate names
 * @return a list with the duplicate names removed
 */
fun removeDuplicates(names: List<String>, keyword: String): List<String> {
/**
 * Given a list of names and a keyword, this function removes any duplicate names that contain the keyword.
 * The function returns a new list with the duplicates removed.
 *
 * @param names a list of names
 * @param keyword a string to identify the duplicate names
 * @return a list with the duplicate names removed
 */
fun removeDuplicates(names: List<String>, keyword: String): List<String> {

    val newList = mutableListOf<String>()

    // Iterate through each name in the given list
    for (name in names) {
        // Use the AND operator to check if the current name contains the keyword and if it is not already in the new list
        if (name.contains(keyword) && !newList.contains(name)) {
            newList.add(name)
        }
    }

    return newList
}