title: algorithm to find the three majority elements in an array
body: <p>Let's say there are three elements in a non-sorted array all of which appear more than one-fourth times of the total number of elements.</p>
  
  <p>What is the most efficient way to find these elements? Both for non-online and online versions of this question.</p>
  
  <p>Thank you!</p>
  
  <p><strong>Edit</strong></p>
  
  <p>The non-online version I was referring to is: this array is specified in full. The online version means the array elements are coming one at a time.</p>
  
  <p>I require the space in addition to time complexity to be tight.</p>
  
  <p>disclaimer: THIS IS NOT HOMEWORK! I consider this as research-level question.</p>