leetcode987】的更多相关文章

Given a binary tree, return the vertical order traversal of its nodes values. For each node at position (X, Y), its left and right children respectively will be at positions (X-1, Y-1)and (X+1, Y-1). Running a vertical line from X = -infinity to X =…
public class Solution { private Dictionary<int, List<KeyValuePair<int,int>>> dic = new Dictionary<int, List<KeyValuePair<int, int>>>(); ,) { if(root != null) { if(dic.ContainsKey(val)) { dic[val].Add(new KeyValuePair<…