/**
 * Given a list 'lst', starting and ending indices 'start' and 'end', and an index 'deleteIndex',
 * this function performs two operations:
 *
 * 1. Deletes the element at the index 'deleteIndex' from the list 'lst'.
 * 2. Slices the list 'lst' from index 'start' (inclusive) to index 'end' (exclusive).
 *
 * Returns the resulting modified list.
 */
fun deleteAndSliceList(lst: MutableList<Int>, start: Int, end: Int, deleteIndex: Int): List<Int> {

    lst.removeAt(deleteIndex)
    return lst.subList(start, end)
}

// Example usage
/**
 * Given a list 'lst', starting and ending indices 'start' and 'end', and an index 'deleteIndex',
 * this function performs two operations:
 *
 * 1. Deletes the element at the index 'deleteIndex' from the list 'lst'.
 * 2. Slices the list 'lst' from index 'start' (inclusive) to index 'end' (exclusive).
 *
 * Returns the resulting modified list.
 */
fun deleteAndSliceList(lst: MutableList<Int>, start: Int, end: Int, deleteIndex: Int): List<Int> {
/**
 * Given a list 'lst', starting and ending indices 'start' and 'end', and an index 'deleteIndex',
 * this function performs two operations:
 *
 * 1. Deletes the element at the index 'deleteIndex' from the list 'lst'.
 * 2. Slices the list 'lst' from index 'start' (inclusive) to index 'end' (exclusive).
 *
 * Returns the resulting modified list.
 */
fun deleteAndSliceList(lst: MutableList<Int>, start: Int, end: Int, deleteIndex: Int): List<Int> {

    lst.removeAt(deleteIndex)
    return lst.subList(start, end)
}

// Example usage