It can be easily done in O(N) using 3 pointers, don't use binary search


#1

Comment body goes here.It can be easily done in O(N) using 3 pointers, don’t use binary search