摘要:
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 阅读全文
摘要:
QuestionClone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labe... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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)... 阅读全文
摘要:
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 阅读全文
摘要:
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... 阅读全文