title: Identify Duplicates In Array
body: <p>I have an array of custom objects and want to know how to identify which objects are duplicates. I know how to remove the duplicates but that is not functionality I'm after. Im using swift 2.</p>
  
  <p>Example:</p>
  
  <pre><code>var movies: [Movie] = ["Batman v Superman: Dawn of Justice", "Batman v Superman: Dawn of Justice", "Deadpool"," "Deadpool", "Hardcore Henry", "Jason Bourne", "Jurassic World"]
  </code></pre>
  
  <p>So i want to show a table view with the list of movies above but with "Batman" and "Deadpool" highlighted.</p>
  
  <p>For more clarity on what I'm trying to achieve look at the screenshot. I have a list of movies that two users select in a previous view controller. I want to display the selected movies in a table view. I want to specifically show if there were movies that both people selected.</p>
  
  <p><a href="https://i.stack.imgur.com/Gmz0C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gmz0C.png" alt="enter image description here"></a></p>