/**
 * Given a list of numbers, find the smallest two numbers and return them as a Pair.
 *
 * @param numbers List of numbers.
 * @return Pair containing the smallest two numbers.
 *
 * Example:
 * findSmallestTwoNumbers(listOf(8, 12, 4, 20, 1, 3)) // Output: Pair(1, 3)
 */
fun findSmallestTwoNumbers(numbers: List<Int>): Pair<Int, Int> {

    var smallest = Int.MAX_VALUE
    var secondSmallest = Int.MAX_VALUE

    for (num in numbers) {
        if (num < smallest) {
            secondSmallest = smallest
            smallest = num
        } else if (num < secondSmallest) {
            secondSmallest = num
        }
    }

    return Pair(smallest, secondSmallest)
}
/**
 * Given a list of numbers, find the smallest two numbers and return them as a Pair.
 *
 * @param numbers List of numbers.
 * @return Pair containing the smallest two numbers.
 *
 * Example:
 * findSmallestTwoNumbers(listOf(8, 12, 4, 20, 1, 3)) // Output: Pair(1, 3)
 */
fun findSmallestTwoNumbers(numbers: List<Int>): Pair<Int, Int> {
/**
 * Given a list of numbers, find the smallest two numbers and return them as a Pair.
 *
 * @param numbers List of numbers.
 * @return Pair containing the smallest two numbers.
 *
 * Example:
 * findSmallestTwoNumbers(listOf(8, 12, 4, 20, 1, 3)) // Output: Pair(1, 3)
 */
fun findSmallestTwoNumbers(numbers: List<Int>): Pair<Int, Int> {

    var smallest = Int.MAX_VALUE
    var secondSmallest = Int.MAX_VALUE

    for (num in numbers) {
        if (num < smallest) {
            secondSmallest = smallest
            smallest = num
        } else if (num < secondSmallest) {
            secondSmallest = num
        }
    }

    return Pair(smallest, secondSmallest)
}