How can i solve this using divide and conquer,
My approach
- sort array
- use two pointer
How can i solve this using divide and conquer,
My approach
This is fine approach… Follow this only.
DnC says check if you have answer in left half of array or right half or both.
2 pointer approach is the best approach for this problem.