/**
 * Given a set of numbers, replace any negative number with a specified replacement number.
 *
 * @param numbers A set of numbers.
 * @param replacement The number to replace negative numbers with.
 * @return A set of numbers with all negative numbers replaced.
 */
fun replaceNegative(numbers: MutableSet<Int>, replacement: Int): MutableSet<Int> {

    val numbersCopy = numbers.toSet()
    for (num in numbersCopy) {
        if (num < 0) {
            numbers.remove(num)
            numbers.add(replacement)
        }
    }
    return numbers
}
/**
 * Given a set of numbers, replace any negative number with a specified replacement number.
 *
 * @param numbers A set of numbers.
 * @param replacement The number to replace negative numbers with.
 * @return A set of numbers with all negative numbers replaced.
 */
fun replaceNegative(numbers: MutableSet<Int>, replacement: Int): MutableSet<Int> {
/**
 * Given a set of numbers, replace any negative number with a specified replacement number.
 *
 * @param numbers A set of numbers.
 * @param replacement The number to replace negative numbers with.
 * @return A set of numbers with all negative numbers replaced.
 */
fun replaceNegative(numbers: MutableSet<Int>, replacement: Int): MutableSet<Int> {

    val numbersCopy = numbers.toSet()
    for (num in numbersCopy) {
        if (num < 0) {
            numbers.remove(num)
            numbers.add(replacement)
        }
    }
    return numbers
}