注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
Q1:
Given the root of a binary tree, return the vertical order traversal of its nodes’ values (from left to right, top to bottom, column by column).
Example:
Input Tree:
100
/ \
2 3
/ \ / \
4 5 6 7
Output:
[[4], [2], [100, 5, 6], [3], [7]]
Q2:
Giv您好! 本帖隐藏的内容需要积分高于 188 才可浏览 您当前积分为 0。 使用VIP即刻解锁阅读权限或查看其他获取积分的方式 游客,您好! 本帖隐藏的内容需要积分高于 188 才可浏览 您当前积分为 0。 VIP即刻解锁阅读权限 或 查看其他获取积分的方式 • target_sum = 5
Output:
• 2 (because [2, 3] and [5] both sum to 5). |