摘要:
题目 代码 法一、中序遍历结果保存下来,查看是否是递增序列 1 class Solution { 2 public: 3 vector<int>res; 4 void dfs(TreeNode* root){ 5 if(root == NULL) return; 6 dfs(root->left); 阅读全文
posted @ 2021-03-11 22:17
Uitachi
阅读(59)
评论(0)
推荐(0)
摘要:
题目 代码 1 class Solution { 2 public: 3 TreeNode* constructMaximumBinaryTree(vector<int>& nums) { 4 //数组长度是一直接返回 5 if(nums.size() == 1) {TreeNode *root = 阅读全文
posted @ 2021-03-11 18:35
Uitachi
阅读(50)
评论(0)
推荐(0)