title: Get duplicates in NSArray
body: <p>I have an NSArray which contains a few duplicate objects. I want to print which objects are getting duplicated, for example:</p>
  
  <pre><code>NSArray * array = [NSArray arrayWithObjects: A, B, C, A, B];
  </code></pre>
  
  <p>Now I want to print in my console <code>A</code> &amp; <code>B</code> as these are duplicated.</p>
  
  <p>How do I do this? </p>