Skip to content

Commit 9fa4dec

Browse files
committed
Update documentation for two sum
1 parent c452e4c commit 9fa4dec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/java1/algorithms/array/twoSum2/TwoSum2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This problem is solved with the help of two pointer technique. The algorithmic a
1919

2020
4. If the total is greater than target, decrement the right pointer to decrease the total value as per given target.
2121

22-
5. If the total is less than target, increment the right pointer to increase the total value as per given target.
22+
5. If the total is less than target, increment the left pointer to increase the total value as per given target.
2323

2424
6. Repeat 2-5 steps until the two numbers sum is equal to the target.
2525

src/javascript/algorithms/array/2.twoSum2/twoSum2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This problem is solved with the help of **two pointers** technique. The algorith
1919

2020
4. If the total is greater than target, decrement the right pointer to decrease the total value as per given target.
2121

22-
5. If the total is less than target, increment the right pointer to increase the total value as per given target.
22+
5. If the total is less than target, increment the left pointer to increase the total value as per given target.
2323

2424
6. Repeat 2-5 steps until the two numbers sum is equal to the target.
2525

0 commit comments

Comments
 (0)