Skip to content

Commit 541238c

Browse files
authored
Update README.md
1 parent 9415f45 commit 541238c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Solutions/TwoSum/C/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
## My approach
1+
## Approach
22
- A custom struct Number is used to store both the value and original index of each number from the input array.
33
- The array is then sorted using bubble sort based on the values.
44
- A two-pointer technique is applied:
55
- One pointer starts at the beginning (left), and one at the end (right) of the sorted array.
66
- The loop moves the pointers inward until a pair is found such that value[left] + value[right] == target.
7-
- The original indices of the two numbers that sum up to the target are stored in a dynamically allocated result array and returned.
7+
- The original indices of the two numbers that sum up to the target are stored in a dynamically allocated result array and returned.

0 commit comments

Comments
 (0)