Trie and Patricia Trie Overview

David Eisler · 59K views · 2013 · 7:55

Open on YouTube

Algorithms & data structuresexplainer

Why Stack Overflow recommends it

Stack Overflow users link it as a quick visual explanation of how a Patricia trie works and why it is faster and lighter than a plain trie for string search.

Recommended by 2 people across 2 different months, 2013 to 2016.

What it is

A short 2013 explainer by David Eisler that introduces the trie data structure and then the Patricia (radix) trie, which compresses chains of single-child nodes. It uses Graphviz-drawn diagrams to walk through how the structures are built and searched, and ends with a time and memory comparison.

What people said

Recommends Eurig Jones · 2013-07 · Stack Overflow · on “Efficient String text search”

Ok. Thanks for answering and commenting everybody. I realise that the question I asked can have broad and varied answers. But this is what I ended up using because the performance was very important so using standard Collections just won't cut the mustard. I used a "Patricia Trie" structure which is a very powerful and elegant datastructure capable of offering low memory overheads and extremely fast search speeds. If anyone is interested, there is a video here [this video] briefly explaining how a Patricia Trie works. You will realise why it's so performant after watching. Also there is a Java implementation of the data structure on github here [LINK] .

Recommends Justin · 2015-12 · Stack Overflow · on “Patricia Trie for fast retrieval of IPv4 address and satellite data”

@Seb I'd assume they refer to the compressed version of the Patricia Trie (as seen in my second example above). That being said, Patricia Trie seems to be a bit overloaded in it's definition. The version I wrote follows along with the explanation here: [this video]

Cites Eric Nord · 2016-05 · Stack Overflow · on “Trie vs Radix tree vs Patricia trie”

[this video] Time measure on last slide for Trie and PatriciaTrie Also PatriciaTrie consumes less memory than Trie