/**
 * This function takes a list of nurse data and returns a new list containing
 * a portion of the original list based on the start and end index provided.
 *
 * @param nurseData List containing nurse data.
 * @param startIndex Start index for slicing.
 * @param endIndex End index for slicing.
 * @return Sliced portion of the nurseData list.
 *
 * Example:
 * val nurseData = listOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
 * val startIndex = 2
 * val endIndex = 7
 *
 * sliceArray(nurseData, startIndex, endIndex)
 * Output: [3, 4, 5, 6, 7]
 */
fun sliceArray(nurseData: List<Int>, startIndex: Int, endIndex: Int): List<Int> {

    return nurseData.subList(startIndex, endIndex)
}

val nurseData = listOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
val startIndex = 2
val endIndex = 7
/**
 * This function takes a list of nurse data and returns a new list containing
 * a portion of the original list based on the start and end index provided.
 *
 * @param nurseData List containing nurse data.
 * @param startIndex Start index for slicing.
 * @param endIndex End index for slicing.
 * @return Sliced portion of the nurseData list.
 *
 * Example:
 * val nurseData = listOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
 * val startIndex = 2
 * val endIndex = 7
 *
 * sliceArray(nurseData, startIndex, endIndex)
 * Output: [3, 4, 5, 6, 7]
 */
fun sliceArray(nurseData: List<Int>, startIndex: Int, endIndex: Int): List<Int> {
/**
 * This function takes a list of nurse data and returns a new list containing
 * a portion of the original list based on the start and end index provided.
 *
 * @param nurseData List containing nurse data.
 * @param startIndex Start index for slicing.
 * @param endIndex End index for slicing.
 * @return Sliced portion of the nurseData list.
 *
 * Example:
 * val nurseData = listOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
 * val startIndex = 2
 * val endIndex = 7
 *
 * sliceArray(nurseData, startIndex, endIndex)
 * Output: [3, 4, 5, 6, 7]
 */
fun sliceArray(nurseData: List<Int>, startIndex: Int, endIndex: Int): List<Int> {

    return nurseData.subList(startIndex, endIndex)
}

val nurseData = listOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
val startIndex = 2
val endIndex = 7