Skip to content

Commit 97ffef9

Browse files
committed
commit
1 parent b4e40c3 commit 97ffef9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

167. Two Sum II - Input Array Is Sorted.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ class Solution {
22
public int[] twoSum(int[] numbers, int target) {
33
// In this case, don't use hash map, because
44
// we know that hash map has a faster look up
5-
// time O(1), but this loop up line of code
6-
// should works n times as n is the length of the
7-
// array, so if we use hash map method our program
8-
// should has O(n) time complexity, despite binary search
5+
// time O(1), but this line of code executed n times
6+
// as n is the length of the array, so if we use
7+
// hash map method our program should has O(n)
8+
// time complexity, despite binary search
99
// should has O(log n), which is faster than O(n)
1010

1111
int l = 0;

0 commit comments

Comments
 (0)