摘要: 1 """ 2 层次遍历 3 """ 4 """ 5 Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by lev 阅读全文
posted @ 2020-02-08 20:15 yawenw 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given two binary trees, write a function to check if they are the same or not. 3 Two binary trees are considered the same if they are structur 阅读全文
posted @ 2020-02-08 20:07 yawenw 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given a binary tree with the following rules: 3 root.val == 0 4 If treeNode.val == x and treeNode.left != null, then treeNode.left.val == 2 * 阅读全文
posted @ 2020-02-08 20:02 yawenw 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given a binary tree, return the sum of values of its deepest leaves. 3 Example 1: 4 Input: root = [1,2,3,4,5,null,6,7,null,null,null,null,8] 5 阅读全文
posted @ 2020-02-08 19:56 yawenw 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given two binary search trees root1 and root2. 3 Return a list containing all the integers from both trees sorted in ascending order. 4 Exampl 阅读全文
posted @ 2020-02-08 19:52 yawenw 阅读(131) 评论(0) 推荐(0) 编辑