/**
 * This function takes a list of historical data and a value. It modifies the list by removing all elements that are divisible by the given value.
 *
 * @param historicalData List of historical data
 * @param value Value to filter the list
 * @return Filtered list after modifying the original list
 */
fun filterList(historicalData: MutableList<Int>, value: Int): List<Int> {

    var i = 0
    while (i < historicalData.size) {
        if (historicalData[i] % value == 0) {
            historicalData.removeAt(i)
            i--
        } else {
            i++
        }
    }
    return historicalData
}
/**
 * This function takes a list of historical data and a value. It modifies the list by removing all elements that are divisible by the given value.
 *
 * @param historicalData List of historical data
 * @param value Value to filter the list
 * @return Filtered list after modifying the original list
 */
fun filterList(historicalData: MutableList<Int>, value: Int): List<Int> {
/**
 * This function takes a list of historical data and a value. It modifies the list by removing all elements that are divisible by the given value.
 *
 * @param historicalData List of historical data
 * @param value Value to filter the list
 * @return Filtered list after modifying the original list
 */
fun filterList(historicalData: MutableList<Int>, value: Int): List<Int> {

    var i = 0
    while (i < historicalData.size) {
        if (historicalData[i] % value == 0) {
            historicalData.removeAt(i)
            i--
        } else {
            i++
        }
    }
    return historicalData
}