Coding

Vertical Order Traversal

Perform a vertical order traversal of a binary tree.

Input: root = [1,2,3,4,5,6,7]

Output: [[4],[2],[1,5,6],[3],[7]]

Explanation: Traverses the tree maintaining column indices, seamlessly grouping nodes that share the exact same vertical alignment.

Was asked at

Practice this question with AI

First session is free - no credit card required.

Go Premium

More interviews, more skills, more success.

No answers yet

Be the first to share your approach to this question

Practice More Questions