/**
 * Given a list of rock layers, sort them in ascending order based on their depth.
 *
 * @param rockLayers A list of pairs representing different rock layers. Each pair contains a rock type and a numerical depth.
 * @return The sorted list of rock layers.
 *
 * Example:
 * val rockLayers = listOf(Pair("sandstone", 10), Pair("shale", 5), Pair("limestone", 20))
 * sortRockLayers(rockLayers)
 * Output: [('shale', 5), ('sandstone', 10), ('limestone', 20)]
 */
fun sortRockLayers(rockLayers: List<Pair<String, Int>>): List<Pair<String, Int>> {

    return rockLayers.sortedBy { it.second }
}
/**
 * Given a list of rock layers, sort them in ascending order based on their depth.
 *
 * @param rockLayers A list of pairs representing different rock layers. Each pair contains a rock type and a numerical depth.
 * @return The sorted list of rock layers.
 *
 * Example:
 * val rockLayers = listOf(Pair("sandstone", 10), Pair("shale", 5), Pair("limestone", 20))
 * sortRockLayers(rockLayers)
 * Output: [('shale', 5), ('sandstone', 10), ('limestone', 20)]
 */
fun sortRockLayers(rockLayers: List<Pair<String, Int>>): List<Pair<String, Int>> {
/**
 * Given a list of rock layers, sort them in ascending order based on their depth.
 *
 * @param rockLayers A list of pairs representing different rock layers. Each pair contains a rock type and a numerical depth.
 * @return The sorted list of rock layers.
 *
 * Example:
 * val rockLayers = listOf(Pair("sandstone", 10), Pair("shale", 5), Pair("limestone", 20))
 * sortRockLayers(rockLayers)
 * Output: [('shale', 5), ('sandstone', 10), ('limestone', 20)]
 */
fun sortRockLayers(rockLayers: List<Pair<String, Int>>): List<Pair<String, Int>> {

    return rockLayers.sortedBy { it.second }
}