Keyword Tree / Trie data structure implementation

Revision en1, by netflix, 2018-01-02 09:43:09

Whenever I solve a question using the Keyword Tree / Trie data-structure, I implement it using pointers. But I have seen many programmers implementing trie using arrays.

What are the downsides of using the Pointers implementation (if at all) , as compared to the Arrays implementation ?

Pointers Implementation Code

Arrays Implementation Code

Happy Coding !

Tags trie, pointers

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English netflix 2018-01-02 09:43:09 476 Initial revision (published)