Although a trie is most commonly useful for dictionaries of words, you may desire a larger set of characters than just 26 letters. In such a case, expanding the code above to include arrays of size 256 (to encompass the entire extended ASCII table, for example) would be impractical, for memory usage will go through the roof--even for relatively small data sets. Converting that to a linked list would help minimize memory usage but could significanly increase search times.

As an alternative to using an array or a linked list to store each token in a given trie entry, some form of tree can be used instead (hint: an avl tree or a binary tree). Using an avl tree, for example, will reduce search times for a given token of an entry from O(n) (using a linked list) to O(log n) as well as minimize memory usage over that of the array approach. As an additional bonus, dictionaries can be constructed from entries whose elements are of variable size. Such a construct might be useful in something akin to a compression algorithm's dictionary or some obscure indexing algorithm that does weird lookups. At the slight expense of creation (and possibly deletion) overhead, this type of construct could provide a great balance between speed, memory usage, and element size--specifically with particularly large data sets.