@allbugs I had written a similar code but when I try to submit , For large input it throws time limit exceeded. Any suggestions ? Were you able to submit?

For the solution 1 and 2 , what will happen in this case?
[1,2,2,2,3] target=3
Should it return [1,2] or [1,4]? Since both solution will return the latter one, which one is correct?

This is a good idea dealing with array with all positive numbers. But it does not work when numbers arrays having negative values. Let's say numbers array is {-1, 1}, and target is 0.

if we can solve 2sum in log(n), we can solve 3sum in nlog(n). However, until 2014, the best we achieve is O(n^2/(logn/loglogn)^(2/3)) according to wikipedia. So I don't think it is possible, right?

Your solution does not work with negative ints in the input. I do not believe you can use a binary search on this problem unless you are told there will only be positives (which we have not been given in the instructions)

we can set the right pointer firstly for instance of some corner case,
such as{0,0,1,1,1,1,1,1,1,1,1},0
here's the code
while(numbers[l+(r-l)/2]>target){
r = l + (r-l)/2;
}