/**
 * Given a list of integers, create a tuple containing all the odd numbers from the list
 * and the even numbers in reverse order.
 *
 * @param values A list of integers.
 * @return A tuple containing the odd numbers from the list and the even numbers in reverse order.
 *
 * Example:
 * createTupleFromRange(listOf(1, 2, 3, 4, 5, 6)) -> (5, 3, 1, 6, 4, 2)
 */
fun createTupleFromRange(values: List<Int>): Pair<List<Int>, List<Int>> {

    val oddNumbers = mutableListOf<Int>()
    val evenNumbers = mutableListOf<Int>()

    for (value in values) {
        if (value % 2 == 0) {
            evenNumbers.add(value)
        } else {
            oddNumbers.add(value)
        }
    }

    return Pair(oddNumbers, evenNumbers.reversed())
}
/**
 * Given a list of integers, create a tuple containing all the odd numbers from the list
 * and the even numbers in reverse order.
 *
 * @param values A list of integers.
 * @return A tuple containing the odd numbers from the list and the even numbers in reverse order.
 *
 * Example:
 * createTupleFromRange(listOf(1, 2, 3, 4, 5, 6)) -> (5, 3, 1, 6, 4, 2)
 */
fun createTupleFromRange(values: List<Int>): Pair<List<Int>, List<Int>> {
/**
 * Given a list of integers, create a tuple containing all the odd numbers from the list
 * and the even numbers in reverse order.
 *
 * @param values A list of integers.
 * @return A tuple containing the odd numbers from the list and the even numbers in reverse order.
 *
 * Example:
 * createTupleFromRange(listOf(1, 2, 3, 4, 5, 6)) -> (5, 3, 1, 6, 4, 2)
 */
fun createTupleFromRange(values: List<Int>): Pair<List<Int>, List<Int>> {

    val oddNumbers = mutableListOf<Int>()
    val evenNumbers = mutableListOf<Int>()

    for (value in values) {
        if (value % 2 == 0) {
            evenNumbers.add(value)
        } else {
            oddNumbers.add(value)
        }
    }

    return Pair(oddNumbers, evenNumbers.reversed())
}