[go: nahoru, domu]

Skip to content

Commit

Permalink
补充参考链接
Browse files Browse the repository at this point in the history
  • Loading branch information
shevakuilin committed Sep 17, 2019
1 parent 0126e46 commit 886eaf9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import UIKit
// 输出: [1,2]
// 解释: 2 与 7 之和等于目标数 9 。因此 index1 = 1, index2 = 2 。

// 解1,二分法:
// 解1,二分法
// 解2,双指针对撞

class Solution {
func twoSum(_ numbers: [Int], _ target: Int) -> [Int] {
Expand Down Expand Up @@ -68,3 +69,4 @@ class Solution {

// 参考:
// 二分法:https://segmentfault.com/a/1190000008699980
// 官方题解:https://leetcode-cn.com/problems/two-sum-ii-input-array-is-sorted/solution/liang-shu-zhi-he-ii-shu-ru-you-xu-shu-zu-by-leetco/

0 comments on commit 886eaf9

Please sign in to comment.