摘要: Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths where the sum of the node values in the path equals targetSum. 阅读全文
posted @ 2020-01-12 14:27 CNoodle 阅读(457) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the 阅读全文
posted @ 2020-01-12 13:26 CNoodle 阅读(462) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] 阅读全文
posted @ 2020-01-12 11:56 CNoodle 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level). Example 1: Input: 阅读全文
posted @ 2020-01-12 07:35 CNoodle 阅读(441) 评论(0) 推荐(0) 编辑