/**
 * Given a list of numbers, create two empty lists, even and odd.
 * Append each number to the appropriate list based on whether it is even or odd.
 * Finally, return both lists in a Pair.
 * You are not allowed to use classes.
 *
 * Example:
 * createListOfNumbers(listOf(1, 2, 3, 4, 5))
 */
fun createListOfNumbers(numbers: List<Int>): Pair<List<Int>, List<Int>> {

    val even = mutableListOf<Int>()
    val odd = mutableListOf<Int>()

    for (num in numbers) {
        if (num % 2 == 0) {
            even.add(num)
        } else {
            odd.add(num)
        }
    }

    return Pair(even, odd)
}
/**
 * Given a list of numbers, create two empty lists, even and odd.
 * Append each number to the appropriate list based on whether it is even or odd.
 * Finally, return both lists in a Pair.
 * You are not allowed to use classes.
 *
 * Example:
 * createListOfNumbers(listOf(1, 2, 3, 4, 5))
 */
fun createListOfNumbers(numbers: List<Int>): Pair<List<Int>, List<Int>> {
/**
 * Given a list of numbers, create two empty lists, even and odd.
 * Append each number to the appropriate list based on whether it is even or odd.
 * Finally, return both lists in a Pair.
 * You are not allowed to use classes.
 *
 * Example:
 * createListOfNumbers(listOf(1, 2, 3, 4, 5))
 */
fun createListOfNumbers(numbers: List<Int>): Pair<List<Int>, List<Int>> {

    val even = mutableListOf<Int>()
    val odd = mutableListOf<Int>()

    for (num in numbers) {
        if (num % 2 == 0) {
            even.add(num)
        } else {
            odd.add(num)
        }
    }

    return Pair(even, odd)
}