/**
 * Given a list of numbers, modify the elements between the start and end indices by incrementing
 * each element by the given increment value.
 *
 * @param numberList A list of numbers.
 * @param start The starting index.
 * @param end The ending index (inclusive).
 * @param increment The value by which each element should be incremented.
 * @return The modified list.
 *
 * Example:
 * modifyList(listOf(1, 2, 3, 4, 5, 6, 7), 2, 5, 10) -> [1, 2, 13, 14, 15, 16, 7]
 */
fun modifyList(numberList: MutableList<Int>, start: Int, end: Int, increment: Int): List<Int> {

    for (i in start..end) {
        numberList[i] += increment
    }
    return numberList
}
/**
 * Given a list of numbers, modify the elements between the start and end indices by incrementing
 * each element by the given increment value.
 *
 * @param numberList A list of numbers.
 * @param start The starting index.
 * @param end The ending index (inclusive).
 * @param increment The value by which each element should be incremented.
 * @return The modified list.
 *
 * Example:
 * modifyList(listOf(1, 2, 3, 4, 5, 6, 7), 2, 5, 10) -> [1, 2, 13, 14, 15, 16, 7]
 */
fun modifyList(numberList: MutableList<Int>, start: Int, end: Int, increment: Int): List<Int> {
/**
 * Given a list of numbers, modify the elements between the start and end indices by incrementing
 * each element by the given increment value.
 *
 * @param numberList A list of numbers.
 * @param start The starting index.
 * @param end The ending index (inclusive).
 * @param increment The value by which each element should be incremented.
 * @return The modified list.
 *
 * Example:
 * modifyList(listOf(1, 2, 3, 4, 5, 6, 7), 2, 5, 10) -> [1, 2, 13, 14, 15, 16, 7]
 */
fun modifyList(numberList: MutableList<Int>, start: Int, end: Int, increment: Int): List<Int> {

    for (i in start..end) {
        numberList[i] += increment
    }
    return numberList
}