← 返回 apple 的题目列表Binary Tree Vertical Order Traversal
类型:qbank
Given the root of a binary tree, return the vertical order traversal of its nodes' values.
Examples
Example 1:
Input: root = [3,9,20,null,null,15,7]
Output: [[9],[3,15],[20],[7]]
Example 2:
Input: root = [3,9,8,4,0,1,7]
Output: [[4],[9],[3,0,1],[8],[7]]
Constraints
The number of nodes in the tree is in the range [0, 100].
-100 <= Node.val <= 100