I want to detect duplicates in a given array using divide and conquer approach. Can I use Merge Sort for this:
First split the array in log N steps
Then sort by merging
While merging use a counter variable to detect duplicates. O(N)
So in total it will take O(N log N) steps...
Is this approach correct?