摘要: 问题: 实现下面两个转换: TreeNode* -> string string -> TreeNode* Example 1: Input: root = [1,2,3,null,null,4,5] Output: [1,2,3,null,null,4,5] Example 2: Input: r 阅读全文
posted @ 2020-09-26 18:30 habibah_chang 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 654. Maximum Binary Tree 问题: 用给定的数组,构成最大二叉树。 从数组中找到最大值,作为root,其index以左,作为左子树。index以右,作为右子树。 Example 1: Input: [3,2,1,6,0,5] Output: return the tree ro 阅读全文
posted @ 2020-09-26 14:02 habibah_chang 阅读(115) 评论(0) 推荐(0) 编辑