/** * File: two_sum.kt * Created Time: 2024-01-25 * Author: curtishd (1023632660@qq.com) */ package chapter_searching /* 方法一:暴力枚举 */ fun twoSumBruteForce(nums: IntArray, target: Int): IntArray { val size = nums.size // 两层循环,时间复杂度为 O(n^2) for (i in 0..() // 单层循环,时间复杂度为 O(n) for (i in 0..