Data Structures
Binary Tree in Data Structure — Traversals · Interactive Demo
b) Binary Tree Traversals
1. Inorder Traversal
Left → Root → Right
2. Preorder Traversal
Root → Left → Right
3. Postorder Traversal
Left → Right → Root
1. Tree traversals
2. Binary Search Tree
3. Hash table · linear probing
4. STL unordered_map
5. First non-repeating char
6. Reconstruct binary tree
7. BST insert 15/90/65
8. Tower of Hanoi
9. Fibonacci recursion
10. Reverse a string with a stack
11. Reverse the first K of a queue
12. Stack · editor Undo
13. Stack · palindrome checker
14. Queue · clinic line
15. Linear search
16. Binary search
17. Bubble sort
18. Insertion sort
19. Shell sort
20. Quick sort
21. Selection sort
22. Heap sort
23. Merge sort
24. Radix sort
25. Bubble sort · names
26. Exam cram · outcome2
27. Merge sort · recursion tree
28. Min-stack
29. std::set operations
🎓 Quiz mode: show ? ? ? ? ? ? ? first
✅ Reveal answers
🌳 Example Tree
complete binary tree 1–7 (same as the slides)
active call
visited
orange badge = visit order
∅ = NULL (returns at once)
Traversal output:
💬 Current step
💻 C++ Recursive Implementation
Yellow row = current line. Watch the call stack: each recursive call is its own frame with Left/Root/Right progress lights.
🥞 Recursion call-stack expansion
mirrors the slide's step-by-step trace
⏮ Reset
◀ Back
▶ Play
Next ▶
⏭ Result
Speed
Shortcuts:
Space
play/pause ·
←
→
step ·
R
reset ·
E
result ·
Q
quiz mode