title: Number of occurrences of words in a file - Complexity?
body: <p>Given I have a file which a set of words:</p>
  
  <p>1) If I choose a hash table to store word -> count, what would be the time complexity to find the occurrences of a particular word?</p>
  
  <p>2) How could I return those words alphabetically ordered?</p>
  
  <p>If I chose a hash table, I know that the time complexity for 1) would be O(n) to parse all the words and O(1) to get the count of a particular word.</p>
  
  <p>I fail to see how could I order the hash table and what would be the time complexity. Any help?</p>