/**
 * Given two lists 'names' and 'scores', remove all elements from 'names' that have a score less than 60.
 *
 * @param names A list of strings representing names.
 * @param scores A list of integers representing scores.
 * @return The updated 'names' list after removing elements.
 *
 * Example:
 * names = ['Alice', 'Bob', 'Charlie', 'Dave']
 * scores = [80, 45, 75, 90]
 * removeElements(names, scores) // Output: ['Alice', 'Charlie', 'Dave']
 */
fun removeElements(names: MutableList<String>, scores: MutableList<Int>): List<String> {

    val iterator = names.iterator()
    while (iterator.hasNext()) {
        val name = iterator.next()
        for (score in scores) {
            if (score < 60) {
                iterator.remove()
                break
            }
        }
    }
    return names
}
/**
 * Given two lists 'names' and 'scores', remove all elements from 'names' that have a score less than 60.
 *
 * @param names A list of strings representing names.
 * @param scores A list of integers representing scores.
 * @return The updated 'names' list after removing elements.
 *
 * Example:
 * names = ['Alice', 'Bob', 'Charlie', 'Dave']
 * scores = [80, 45, 75, 90]
 * removeElements(names, scores) // Output: ['Alice', 'Charlie', 'Dave']
 */
fun removeElements(names: MutableList<String>, scores: MutableList<Int>): List<String> {
/**
 * Given two lists 'names' and 'scores', remove all elements from 'names' that have a score less than 60.
 *
 * @param names A list of strings representing names.
 * @param scores A list of integers representing scores.
 * @return The updated 'names' list after removing elements.
 *
 * Example:
 * names = ['Alice', 'Bob', 'Charlie', 'Dave']
 * scores = [80, 45, 75, 90]
 * removeElements(names, scores) // Output: ['Alice', 'Charlie', 'Dave']
 */
fun removeElements(names: MutableList<String>, scores: MutableList<Int>): List<String> {

    val iterator = names.iterator()
    while (iterator.hasNext()) {
        val name = iterator.next()
        for (score in scores) {
            if (score < 60) {
                iterator.remove()
                break
            }
        }
    }
    return names
}