2019年4月8日

637. Average of Levels in Binary Tree(一棵树每层节点的平均数)(二叉树的层序遍历)

摘要: Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Note: 这个题主要想总结一下bfs算法: 广度优先遍历:类 阅读全文

posted @ 2019-04-08 23:23 shaer 阅读(110) 评论(0) 推荐(0) 编辑

145. Binary Tree Postorder Traversal(非递归实现二叉树的后序遍历)

摘要: Given a binary tree, return the postorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iterative 阅读全文

posted @ 2019-04-08 16:10 shaer 阅读(144) 评论(0) 推荐(0) 编辑

94. Binary Tree Inorder Traversal(非递归实现二叉树的中序遍历)

摘要: Given a binary tree, return the inorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iteratively 阅读全文

posted @ 2019-04-08 14:51 shaer 阅读(92) 评论(0) 推荐(0) 编辑

144. Binary Tree Preorder Traversal(非递归实现二叉树的前序遍历)

摘要: Given a binary tree, return the preorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iterativel 阅读全文

posted @ 2019-04-08 14:00 shaer 阅读(132) 评论(0) 推荐(0) 编辑

导航