You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Two-Sum Problem/README.markdown
+2
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# Two-Sum Problem
2
2
3
+
### About to be edited for Swift 4 woohoo!
4
+
3
5
You're given an array `a` with numbers. Write an algorithm that checks if there are any two entries in the array that add up to a given number `k`. In other words, is there any `a[i] + a[j] == k`?
4
6
5
7
There are a variety of solutions to this problem (some better than others). The following solutions both run in **O(n)** time.
0 commit comments