/**
 * This exercise involves using the multiplication assignment operator and list slicing.
 *
 * You are given a list 'lst' containing integers, and two indices 'start' and 'end'.
 * Your task is to multiply all the elements of the list by 3 using the multiplication
 * assignment operator and then generate a new list by slicing the modified list
 * from index 'start' to 'end' (exclusive).
 *
 * @param lst The original list of integers.
 * @param start The starting index for slicing.
 * @param end The ending index for slicing.
 * @return A new list created by multiplying the elements of 'lst' by 3 and then slicing it.
 */
fun multiplyAndSliceList(lst: MutableList<Int>, start: Int, end: Int): List<Int> {

    // Multiply each element of the list by 3
    lst.replaceAll { it * 3 }

    // Generate a new sliced list
    val slicedList = lst.subList(start, end)

    return slicedList
}
/**
 * This exercise involves using the multiplication assignment operator and list slicing.
 *
 * You are given a list 'lst' containing integers, and two indices 'start' and 'end'.
 * Your task is to multiply all the elements of the list by 3 using the multiplication
 * assignment operator and then generate a new list by slicing the modified list
 * from index 'start' to 'end' (exclusive).
 *
 * @param lst The original list of integers.
 * @param start The starting index for slicing.
 * @param end The ending index for slicing.
 * @return A new list created by multiplying the elements of 'lst' by 3 and then slicing it.
 */
fun multiplyAndSliceList(lst: MutableList<Int>, start: Int, end: Int): List<Int> {
/**
 * This exercise involves using the multiplication assignment operator and list slicing.
 *
 * You are given a list 'lst' containing integers, and two indices 'start' and 'end'.
 * Your task is to multiply all the elements of the list by 3 using the multiplication
 * assignment operator and then generate a new list by slicing the modified list
 * from index 'start' to 'end' (exclusive).
 *
 * @param lst The original list of integers.
 * @param start The starting index for slicing.
 * @param end The ending index for slicing.
 * @return A new list created by multiplying the elements of 'lst' by 3 and then slicing it.
 */
fun multiplyAndSliceList(lst: MutableList<Int>, start: Int, end: Int): List<Int> {

    // Multiply each element of the list by 3
    lst.replaceAll { it * 3 }

    // Generate a new sliced list
    val slicedList = lst.subList(start, end)

    return slicedList
}