Advanced Tree Data Structures – ME CSE (25
Marks Notes)
1. AVL Tree
Self-balancing BST maintaining height difference ±1. Uses rotations (LL, RR, LR, RL). O(log n)
operations. Used in databases.
2. Red-Black Tree
Balanced BST with color rules (red/black). Ensures approximately balanced height. Used in C++
STL, Java TreeMap.
3. Splay Tree
Self-adjusting BST that brings accessed elements to root (zig, zig-zig, zig-zag rotations). Good for
frequently accessed data.
4. Treap
Combines BST (key) and heap (priority). Randomized balancing using rotations. Expected O(log n)
operations.
5. B-Tree
Multi-way search tree for large datasets. All leaves at same level. Efficient for databases and disk
storage.
6. B+ Tree
Extension of B-Tree. Keys in internal nodes; data in leaves linked for sequential access. Used in
MySQL, Oracle.
7. R-Tree
Spatial data structure using bounding rectangles. Ideal for maps and GIS queries.
8. Segment Tree
Binary tree for range queries (sum, min, max). O(log n) update/query. Used in analytics and CP.
9. Fenwick Tree
Binary Indexed Tree. Efficient prefix sum structure with O(log n) operations. Compact version of
Segment Tree.
10. Suffix Tree
Compressed trie of all suffixes of a string. Enables fast pattern matching. Used in DNA analysis,
text search.
11. Trie
Prefix tree for strings. Each edge represents a character. Used in autocomplete, spell checkers, IP
routing.
Applications:
AVL/Red-Black – Databases, indexes.
B/B+ Trees – File systems, MySQL.
R-Tree – Spatial indexing.
Segment/Fenwick – Range queries.
Suffix/Trie – Text processing, search engines.
[Diagrams included: AVL Rotations, B+ Tree Structure, R-Tree Bounding Boxes, Trie
Example]