/**
 * Given a list of floating-point numbers and a small value called epsilon, this function modifies the list
 * by zeroing out the elements that are within epsilon distance from zero.
 *
 * @param lst A list of floating-point numbers.
 * @param epsilon A small value representing the maximum distance allowed from zero.
 *
 * Example:
 * lst = [-0.001, 3.14, -0.0003, 0.0005]
 * epsilon = 0.001
 * Calling modifyListWithEpsilon(lst, epsilon) should modify lst as [-0.001, 3.14, 0.0, 0.0]
 */
fun modifyListWithEpsilon(lst: MutableList<Double>, epsilon: Double) {

    for (i in lst.indices) {
        if (Math.abs(lst[i]) <= epsilon) {
            lst[i] = 0.0
        }
    }
}
/**
 * Given a list of floating-point numbers and a small value called epsilon, this function modifies the list
 * by zeroing out the elements that are within epsilon distance from zero.
 *
 * @param lst A list of floating-point numbers.
 * @param epsilon A small value representing the maximum distance allowed from zero.
 *
 * Example:
 * lst = [-0.001, 3.14, -0.0003, 0.0005]
 * epsilon = 0.001
 * Calling modifyListWithEpsilon(lst, epsilon) should modify lst as [-0.001, 3.14, 0.0, 0.0]
 */
fun modifyListWithEpsilon(lst: MutableList<Double>, epsilon: Double) {
/**
 * Given a list of floating-point numbers and a small value called epsilon, this function modifies the list
 * by zeroing out the elements that are within epsilon distance from zero.
 *
 * @param lst A list of floating-point numbers.
 * @param epsilon A small value representing the maximum distance allowed from zero.
 *
 * Example:
 * lst = [-0.001, 3.14, -0.0003, 0.0005]
 * epsilon = 0.001
 * Calling modifyListWithEpsilon(lst, epsilon) should modify lst as [-0.001, 3.14, 0.0, 0.0]
 */
fun modifyListWithEpsilon(lst: MutableList<Double>, epsilon: Double) {

    for (i in lst.indices) {
        if (Math.abs(lst[i]) <= epsilon) {
            lst[i] = 0.0
        }
    }
}