Trie Data Structure
- 18 Downloads
In this chapter, we will review Trie (pronounced as try) data structures and how to implement it using Swift. A Trie is a tree-based data structure that organizes information in a hierarchy. While most of the other structures are designed to manipulate generic data, Trie is often used with Strings – it is used for storing words in a way which enables fast lookups. Since Trie stores characters at each node, it is very efficient for prefix matching in the English language.