title: Algorithm for finding the number which appears the most in a row - C++
body: <p>I need a help in making an algorithm for solving one problem: There is a row with numbers which appear different times in the row, and i need to find the number that appears the most and how many times it's in the row, ex:</p>
  
  <p>1-1-5-1-3-7-2-1-8-9-1-2 </p>
  
  <p>That would be 1 and it appears 5 times.</p>
  
  <p>The algorithm should be fast (that's my problem). 
  Any ideas ?</p>