# Prefix trees: Comparison between Trie, Ternary Search Tree and Radix Tree

Feb. 26, 2016 Data Structures C++ Prefix Tree Trie Ternary Search Tree Radix Tree
In this post I talk about three data structures I implemented to compare their performance in different scenarios. The three data structures are Trie, Ternary Search Tree and Radix Tree.
All the code for the data structures as well as the tested scenarios are available in this repo in GitHub.
Introduction
What is a prefix tree? It is an ordered tree data structure that is used to store a dynamic set of elements where the key is a string. All the data structures that I implemented have the following... (read more)