We can use 2 pointers on start and at end. We iterate till i< j, & first we calculate sum = num[i]+num[j]. if sum == target return [i+1,j+1] (as 1-based indexing). As the array is sorted moving in ...
There was an error while loading. Please reload this page.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results