/**
 * Given a list of integers [nums], find the two numbers such that they add up
 * to a specific target number [target].
 *
 * Using a break statement, complete the function below which takes in two arguments:
 *
 * @param nums list of integers
 * @param target target number to find the two numbers that add up to it
 * @return A Pair containing the two numbers that add up to the target number, or null if no such pair exists
 *
 * Example:
 * breakAssignment(listOf(2, 7, 11, 15), 9) should return Pair(2, 7) as 2 + 7 equals 9.
 */
fun breakAssignment(nums: List<Int>, target: Int): Pair<Int, Int>? {

    val n = nums.size
    for (i in nums.indices) {
        for (j in i + 1 until n) {
            if (nums[i] + nums[j] == target) {
                // Insert your break statement here
                return Pair(nums[i], nums[j])
            }
        }
    }
    return null
}
/**
 * Given a list of integers [nums], find the two numbers such that they add up
 * to a specific target number [target].
 *
 * Using a break statement, complete the function below which takes in two arguments:
 *
 * @param nums list of integers
 * @param target target number to find the two numbers that add up to it
 * @return A Pair containing the two numbers that add up to the target number, or null if no such pair exists
 *
 * Example:
 * breakAssignment(listOf(2, 7, 11, 15), 9) should return Pair(2, 7) as 2 + 7 equals 9.
 */
fun breakAssignment(nums: List<Int>, target: Int): Pair<Int, Int>? {
/**
 * Given a list of integers [nums], find the two numbers such that they add up
 * to a specific target number [target].
 *
 * Using a break statement, complete the function below which takes in two arguments:
 *
 * @param nums list of integers
 * @param target target number to find the two numbers that add up to it
 * @return A Pair containing the two numbers that add up to the target number, or null if no such pair exists
 *
 * Example:
 * breakAssignment(listOf(2, 7, 11, 15), 9) should return Pair(2, 7) as 2 + 7 equals 9.
 */
fun breakAssignment(nums: List<Int>, target: Int): Pair<Int, Int>? {

    val n = nums.size
    for (i in nums.indices) {
        for (j in i + 1 until n) {
            if (nums[i] + nums[j] == target) {
                // Insert your break statement here
                return Pair(nums[i], nums[j])
            }
        }
    }
    return null
}