/**
 * Given a list of integers, multiply the elements within a given range by 2 and return the modified list.
 *
 * @param data A list of integers.
 * @param startIndex An integer representing the start index of the range.
 * @param endIndex An integer representing the end index of the range.
 * @return A modified list with the elements within the given range multiplied by 2.
 *
 * Example:
 * Input:
 * data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
 * startIndex = 2
 * endIndex = 7
 *
 * Output:
 * [1, 2, 6, 8, 10, 12, 7, 8, 9, 10]
 */
fun multiplyAndModify(data: MutableList<Int>, startIndex: Int, endIndex: Int): List<Int> {

    for (i in startIndex..endIndex) {
        data[i] *= 2
    }
    return data
}
/**
 * Given a list of integers, multiply the elements within a given range by 2 and return the modified list.
 *
 * @param data A list of integers.
 * @param startIndex An integer representing the start index of the range.
 * @param endIndex An integer representing the end index of the range.
 * @return A modified list with the elements within the given range multiplied by 2.
 *
 * Example:
 * Input:
 * data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
 * startIndex = 2
 * endIndex = 7
 *
 * Output:
 * [1, 2, 6, 8, 10, 12, 7, 8, 9, 10]
 */
fun multiplyAndModify(data: MutableList<Int>, startIndex: Int, endIndex: Int): List<Int> {
/**
 * Given a list of integers, multiply the elements within a given range by 2 and return the modified list.
 *
 * @param data A list of integers.
 * @param startIndex An integer representing the start index of the range.
 * @param endIndex An integer representing the end index of the range.
 * @return A modified list with the elements within the given range multiplied by 2.
 *
 * Example:
 * Input:
 * data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
 * startIndex = 2
 * endIndex = 7
 *
 * Output:
 * [1, 2, 6, 8, 10, 12, 7, 8, 9, 10]
 */
fun multiplyAndModify(data: MutableList<Int>, startIndex: Int, endIndex: Int): List<Int> {

    for (i in startIndex..endIndex) {
        data[i] *= 2
    }
    return data
}