Implementation of trie data structure for programming challenge.