/**
 * Given a list of integers 'nums', delete all elements within the specified range [start, end] (inclusive).
 *
 * @param nums List of integers
 * @param start Starting index of the range
 * @param end Ending index of the range
 * @return List with elements deleted within the range
 */
fun deleteElementsInRange(nums: MutableList<Int>, start: Int, end: Int): List<Int> {

    if (start >= 0 && end < nums.size) {
        nums.subList(start, end + 1).clear()
    }
    return nums
}
/**
 * Given a list of integers 'nums', delete all elements within the specified range [start, end] (inclusive).
 *
 * @param nums List of integers
 * @param start Starting index of the range
 * @param end Ending index of the range
 * @return List with elements deleted within the range
 */
fun deleteElementsInRange(nums: MutableList<Int>, start: Int, end: Int): List<Int> {
/**
 * Given a list of integers 'nums', delete all elements within the specified range [start, end] (inclusive).
 *
 * @param nums List of integers
 * @param start Starting index of the range
 * @param end Ending index of the range
 * @return List with elements deleted within the range
 */
fun deleteElementsInRange(nums: MutableList<Int>, start: Int, end: Int): List<Int> {

    if (start >= 0 && end < nums.size) {
        nums.subList(start, end + 1).clear()
    }
    return nums
}