Problem Link- https://online.codingblocks.com/player/9957/content/5064
Solution Link- https://ide.codingblocks.com/s/41063
My code is fine. but it is not divide and conquer, it is greedy since i am using sorting and then two pointer approach. Is there a better way to do this in maybe O(n) instead of O(n Log n) ?