Vertical Traversal
Learn Vertical Traversal (Trees, Data Structures & Algorithms) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Grouping Nodes by Vertical Column Extends the Top/Bottom View's "horizontal distance" idea: instead of keeping only ONE node per column, vertical traversal returns EVERY node in each column, top to bottom. Nodes sharing both the same column AND the same row are typically sorted by VALUE as a tiebreak.
More lessons in Trees
- Binary Tree
- Binary Search Tree - BST
- Full / Complete / Perfect Binary Tree
- Balanced Tree
- Tree Traversal - Preorder
- Tree Traversal - Inorder
- Tree Traversal - Postorder
- Tree Traversal - Level Order
- Recursive Traversal
- Iterative Traversal
- Height / Depth
- Diameter of a Tree
- Lowest Common Ancestor
- Path Sum
- Tree View - Left View
- Tree View - Right View
- Tree View - Top View
- Tree View - Bottom View
- Boundary Traversal
- Zigzag Traversal
- Serialize / Deserialize a Tree
- BST Operations
- BST Validation
- Kth Smallest / Largest in BST
- Morris Traversal