摘要:
Question Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the f 阅读全文
posted @ 2015-09-24 10:17
树獭君
阅读(129)
评论(0)
推荐(0)
摘要:
QuestionClone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labe... 阅读全文
posted @ 2015-09-24 10:07
树獭君
阅读(196)
评论(0)
推荐(0)
摘要:
Reference: superWhen we override superclass's methods, but still want to invoke them, we can use keyword super in child classes.We can also usesuperto... 阅读全文
posted @ 2015-09-24 08:38
树獭君
阅读(178)
评论(0)
推荐(0)
摘要:
QuestionGiven a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next leve... 阅读全文
posted @ 2015-09-24 07:04
树獭君
阅读(171)
评论(0)
推荐(0)
摘要:
QuestionGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the ne... 阅读全文
posted @ 2015-09-24 05:39
树獭君
阅读(148)
评论(0)
推荐(0)
摘要:
QuestionGiven a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root)... 阅读全文
posted @ 2015-09-24 04:58
树獭君
阅读(172)
评论(0)
推荐(0)
摘要:
Question Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binar 阅读全文
posted @ 2015-09-24 04:47
树獭君
阅读(193)
评论(0)
推荐(0)
摘要:
There are two ways to conduct BFS on tree.Solution 1 -- Given levelUse recursion to find given level, and print./*Function to print level order traver... 阅读全文
posted @ 2015-09-24 04:18
树獭君
阅读(298)
评论(0)
推荐(0)

浙公网安备 33010602011771号