/**
 * Given a list, an index and a multiplier, modify the element at the given index
 * by multiplying it with the multiplier.
 *
 * @param lst The list of elements.
 * @param index The index position where the element needs to be modified.
 * @param multiplier The value by which the element should be multiplied.
 * @return The modified list with the element at the given index multiplied by the multiplier.
 */
fun modifyElementsWithMultiplication(lst: MutableList<Int>, index: Int, multiplier: Int): List<Int> {

    // Check if the index is within the valid range of the list
    if (index < 0 || index >= lst.size) {
        return listOf(-1) // Assuming -1 represents an invalid index in the Kotlin list
    }

    // Multiply the element at the given index with the multiplier
    lst[index] *= multiplier

    return lst
}
/**
 * Given a list, an index and a multiplier, modify the element at the given index
 * by multiplying it with the multiplier.
 *
 * @param lst The list of elements.
 * @param index The index position where the element needs to be modified.
 * @param multiplier The value by which the element should be multiplied.
 * @return The modified list with the element at the given index multiplied by the multiplier.
 */
fun modifyElementsWithMultiplication(lst: MutableList<Int>, index: Int, multiplier: Int): List<Int> {
/**
 * Given a list, an index and a multiplier, modify the element at the given index
 * by multiplying it with the multiplier.
 *
 * @param lst The list of elements.
 * @param index The index position where the element needs to be modified.
 * @param multiplier The value by which the element should be multiplied.
 * @return The modified list with the element at the given index multiplied by the multiplier.
 */
fun modifyElementsWithMultiplication(lst: MutableList<Int>, index: Int, multiplier: Int): List<Int> {

    // Check if the index is within the valid range of the list
    if (index < 0 || index >= lst.size) {
        return listOf(-1) // Assuming -1 represents an invalid index in the Kotlin list
    }

    // Multiply the element at the given index with the multiplier
    lst[index] *= multiplier

    return lst
}