/**
 * Given a nurse's schedule (a list of times), modify the elements of the schedule using slicing.
 *
 * @param nurseSchedule A list of times representing the nurse's schedule.
 * @param newShifts A list of new shifts to replace the existing schedule.
 * @return Modified nurse's schedule after replacing the existing shifts.
 */
fun modifyElements(nurseSchedule: MutableList<Int>, newShifts: List<Int>): List<Int> {

    // Replace the old shifts in the nurse's schedule with the new shifts using slicing
    nurseSchedule.subList(0, newShifts.size).clear()
    nurseSchedule.addAll(0, newShifts)

    return nurseSchedule
}
/**
 * Given a nurse's schedule (a list of times), modify the elements of the schedule using slicing.
 *
 * @param nurseSchedule A list of times representing the nurse's schedule.
 * @param newShifts A list of new shifts to replace the existing schedule.
 * @return Modified nurse's schedule after replacing the existing shifts.
 */
fun modifyElements(nurseSchedule: MutableList<Int>, newShifts: List<Int>): List<Int> {
/**
 * Given a nurse's schedule (a list of times), modify the elements of the schedule using slicing.
 *
 * @param nurseSchedule A list of times representing the nurse's schedule.
 * @param newShifts A list of new shifts to replace the existing schedule.
 * @return Modified nurse's schedule after replacing the existing shifts.
 */
fun modifyElements(nurseSchedule: MutableList<Int>, newShifts: List<Int>): List<Int> {

    // Replace the old shifts in the nurse's schedule with the new shifts using slicing
    nurseSchedule.subList(0, newShifts.size).clear()
    nurseSchedule.addAll(0, newShifts)

    return nurseSchedule
}