class TwoSum {
func sumTow(nums: [Int], target: Int)->[Int]{ var ret:[Int]=[,]; for (var x=;x<nums.count;x++){
for(var y=x+;y<nums.count;y++){
if(target==nums[x]+nums[y]){
ret[]=x+
ret[]=y+
}
}
}
return ret;
}
}
相关文章
- 10-12LeetCode(1) -Two Sum
- 10-12[LeetCode] 371. Sum of Two Integers
- 10-12leetcode-mid-math-371. Sum of Two Integers-NO-???
- 10-12Leetcode-1031 Maximum Sum of Two Non-Overlapping Subarrays(两个非重叠子数组的最大和)
- 10-12[Swift Weekly Contest 122]LeetCode985. 查询后的偶数和 | Sum of Even Numbers After Queries
- 10-12【leetcode❤python】Sum Of Two Number
- 10-12【leetcode❤python】 1. Two Sum
- 10-12LeetCode-001 Two Sum
- 10-12LeetCode之Easy篇 ——(1)Two Sum
- 10-121. Two Sum——LeetCode