title: Detecting Duplicates Using Divide and Conquer - Merge Sort
body: <p>I want to detect duplicates in a given array using divide and conquer approach. Can I use Merge Sort for this:</p>
  
  <ol>
  <li><p>First split the array in log N steps</p></li>
  <li><p>Then sort by merging</p></li>
  <li><p>While merging use a counter variable to detect duplicates. O(N)</p></li>
  </ol>
  
  <p>So in total it will take O(N log N) steps...</p>
  
  <p>Is this approach correct?</p>