software_interview_questions
介紹
1.
经验贴
2.
Python
2.1.
Python built-in
2.2.
for loop explained
3.
P, NP, NPC
4.
Data Structure
4.1.
BIT
4.2.
Advanced Trees
5.
Google
5.1.
bit manipulation
5.1.1.
different bits sum pairwise
5.2.
binary search
5.2.1.
painter's partition problem
5.2.2.
allocate books
5.3.
Largest Number
5.4.
Patch Array
5.5.
Jump game II
5.6.
Palindrome Pair
5.7.
Verify binary tree preorder serial
5.8.
wiggle sort
5.9.
Max Distance
6.
snapchat
6.1.
Handle IO
6.2.
Amicable Number
6.3.
min insert to palindrome
6.4.
print matrix diagonal
6.5.
subsets sum
6.6.
Serialize and Deserial a Binary Tree
6.7.
meeting rooms
6.8.
Binary Tree Vertical Order Traversal
6.9.
Big Int
7.
Big Data
7.1.
bloom filter
7.2.
bitmap
Powered by
GitBook
software_interview_questions
Binary Tree Vertical Order Traversal
题目描述
解题方法
1
找出左右的所谓“宽度”,左边为负,右边为正 然后把这个范围再遍历整个树,打印出宽度一样的node
2 hashtable
再第一遍计算宽度的时候将相同的宽度存到一个list里。
Solution
Reference
geeksforgeeks 1
geeksforgeeks 2