SFTPK: Trie
This post is one in a series of stuff formally trained programmers know—the rest of the series can be found in the series index. Today we look at trie, pronounced try, which is a type of tree structure; unlike a binary tree, each node can have many sub-nodes. Like many other data structures, it needs a key, and in the case of a trie, the key must be able to be split into smaller pieces. Strings, for example, can be a key by breaking them up into individual letters, and numbers could be split by digits. Let’s use strings for our keys and store the following data: abba, cat, also, car, & all.