sudheerj / datastructures-algorithms

List of Programs related to data structures and algorithms
448 stars 124 forks source link

"Two sum2- Input array sorted" typo for "right pointer" in step 5 of recommended solutions #10

Closed AmirHossein-z closed 1 month ago

AmirHossein-z commented 1 month ago

Hi. in the "Two sum2- Input array sorted" problem, step 5 of the recommended algorithm link says that the "right" pointer should be decremented but in solution link, it implemented in such a way that "left" pointer is incremented. I think the recommended algorithm should be edited.

sudheerj commented 1 month ago

Thanks @AmirHossein-z for pointing it out. The documentation has been fixed. It should be left pointer.