I did it by help of sorting and then 2 pointer theorm…I want to know how can I apply divide and conquer…
I want to know how do we solve it by Divide and conquer
hello @kaushikjatin
a) sort the array.
b) then for i -> 0 to n-1 check whether target-a[i] is present or not in the right side of index i. (u can use binary search to find this)
c) if exist then update ur answer otherwise move to next
ya …this can be said to be use of Divide and conquer…
Provide me the link so that I can resolve the doubt…