title: Counting unique element in large array
body: <p>One of my colleagues was asked this question in an interview.</p>
  <blockquote>
  <p>Given a huge array which stores unsigned int. Length of array is 100000000. Find the effective way to count the unique number of elements present in the array.</p>
  </blockquote>
  <p>E.g arr = <code>{2,34,5,6,7,2,2,5,1,34,5}</code></p>
  <p>O/p: Count of 2 is 3, Count of 34 is 2 and so on.</p>
  <p>What are effective algorithms to do this? I thought at first dictionary/hash would be one of the options, but since the array is very large it is inefficient. Is there any way to do this?</p>