Tree |
Binary Tree, AVL Tree, Red-Black Tree |
Insert, Delete, Traversal |
1. Organizational chart of a company |
|
B-Tree, Binary Search Tree, N-ary Tree |
|
2. Family tree showing genealogical relationships |
Graph |
Directed, Undirected, Weighted |
Add/Remove Vertex, Add/Remove Edge, Search, Path Finding |
1. Road network (intersections and roads) |
|
Graph, Tree, Acyclic Graph |
|
2. Facebook's friend network |
Heap |
Binary Heap, Fibonacci Heap |
Insert, Delete, Find Max/Min |
1. Priority scheduling (higher priority first) |
|
Min Heap, Max Heap |
|
2. Finding the largest/smallest element quickly |
Hash Table |
Chaining, Open Addressing |
Insert, Delete, Access |
1. Book indexing (word and page number) |
|
Linear Probing, Quadratic Probing |
|
2. User info on website by username |
Set |
Hash Set, Tree Set |
Add, Remove, Contains |
1. Unique collection of items (tags in a blog) |
|
|
|
2. Filtering duplicates from a list |
Trie |
Basic Trie, Compressed Trie |
Insert, Search, Delete |
1. Auto-complete in search engines |
|
Radix Trie, Suffix Trie |
|
2. Spell checker in word processors |