title: Disadvantages of tries
body: <p>I've been studying tries and checking out their advantages and disadvantages. They're quite useful in many practical applications like dictionary, spell checkers etc due to their constant O(m) look-ups (where m is length of the string) and other advantages like providing ordered retrieval of strings, and getting common prefixes. So, the advantages are pretty clear to me, but the limitations are a bit confusing.</p>
  
  <p>I'm following this link : <a href="https://en.wikipedia.org/wiki/Trie" rel="noreferrer">https://en.wikipedia.org/wiki/Trie</a></p>
  
  <p>Drawbacks listed here are: </p>
  
  <ol>
  <li>Tries can be slower in some cases than hash tables for looking up data, especially if the data is directly accessed on a hard disk drive or some other secondary storage device where the random-access time is high compared to main memory.</li>
  </ol>
  
  <p><strong>Follow up question</strong> - Why is there a scenario involving secondary storage? Aren't tries also supposed to be stored in main memory. If they're stored in secondary storage, then there's no use of using trie anyways as disk access will always cause greater times.</p>
  
  <ol start="2">
  <li>Some tries can require more space than a hash table, as memory may be allocated for each character in the search string, rather than a single chunk of memory for the whole entry, as in most hash tables. </li>
  </ol>
  
  <p><strong>Follow-up question</strong> : Is it due to the fact that tries would contain more references/pointers for connecting each character to next one, and that'd consume more bytes than if it was stored as a whole string? (I got this reason from one of the answers here). Can anyone elaborate this too?</p>
  
  <p>I'd really appreciate some help here. Thanks.</p>