/**
 * Given a list of numbers and a factor, multiply each number in the list by the factor
 * using the multiplication assignment operator (*=). Return the resulting list.
 *
 * Example:
 * Input:
 * numbers = [2, 4, 6, 8]
 * factor = 3
 * Output:
 * [6, 12, 18, 24]
 */
fun multiplyAndUpdate(numbers: MutableList<Int>, factor: Int): List<Int> {

    // Iterate over each number in the list
    for (i in numbers.indices) {
        // Multiply the number by the factor using the multiplication assignment operator
        numbers[i] *= factor
    }

    return numbers
}
/**
 * Given a list of numbers and a factor, multiply each number in the list by the factor
 * using the multiplication assignment operator (*=). Return the resulting list.
 *
 * Example:
 * Input:
 * numbers = [2, 4, 6, 8]
 * factor = 3
 * Output:
 * [6, 12, 18, 24]
 */
fun multiplyAndUpdate(numbers: MutableList<Int>, factor: Int): List<Int> {
/**
 * Given a list of numbers and a factor, multiply each number in the list by the factor
 * using the multiplication assignment operator (*=). Return the resulting list.
 *
 * Example:
 * Input:
 * numbers = [2, 4, 6, 8]
 * factor = 3
 * Output:
 * [6, 12, 18, 24]
 */
fun multiplyAndUpdate(numbers: MutableList<Int>, factor: Int): List<Int> {

    // Iterate over each number in the list
    for (i in numbers.indices) {
        // Multiply the number by the factor using the multiplication assignment operator
        numbers[i] *= factor
    }

    return numbers
}