Binary Tree Vertical Order Traversal

Given a binary tree, return its node values in vertical order.

  • The root is at column 0.
  • For a node at column c, its left child is at c - 1 and its right child is at c + 1.
  • Return co...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: