Leetcode | easy | Two Sum
Leetcode 里的 easy题
原题:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].
分析:
题意就是给定一个sum,一个数组,然后你需要输出数组中两个相加之后的和等于这个sum的数字的下标
思路:
1当然可以来个二重...
原创
2018-09-18 19:28:49 ·
179 阅读 ·
0 评论