/**
 * Deletes the elements greater than the given threshold from the input list.
 *
 * @param numbers A list of integers.
 * @param threshold The upper limit of values to be deleted.
 * @return The modified list after deleting elements greater than the threshold.
 */
fun deleteGreaterElements(numbers: MutableList<Int>, threshold: Int): List<Int> {

    val iterator = numbers.iterator()
    while (iterator.hasNext()) {
        if (iterator.next() > threshold) {
            iterator.remove()
        }
    }
    return numbers
}
/**
 * Deletes the elements greater than the given threshold from the input list.
 *
 * @param numbers A list of integers.
 * @param threshold The upper limit of values to be deleted.
 * @return The modified list after deleting elements greater than the threshold.
 */
fun deleteGreaterElements(numbers: MutableList<Int>, threshold: Int): List<Int> {
/**
 * Deletes the elements greater than the given threshold from the input list.
 *
 * @param numbers A list of integers.
 * @param threshold The upper limit of values to be deleted.
 * @return The modified list after deleting elements greater than the threshold.
 */
fun deleteGreaterElements(numbers: MutableList<Int>, threshold: Int): List<Int> {

    val iterator = numbers.iterator()
    while (iterator.hasNext()) {
        if (iterator.next() > threshold) {
            iterator.remove()
        }
    }
    return numbers
}