摘要: Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2] # Definition for a bina 阅读全文
posted @ 2019-10-18 20:38 xuan_abc 阅读(94) 评论(0) 推荐(0)
摘要: Given a binary tree, return the preorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,2,3]Solution 1: # Definitio 阅读全文
posted @ 2019-10-18 11:22 xuan_abc 阅读(85) 评论(0) 推荐(0)
摘要: Given a non-empty binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any 阅读全文
posted @ 2019-10-18 10:58 xuan_abc 阅读(105) 评论(0) 推荐(0)