摘要:
```c class Solution { public: TreeNode* deleteNode(TreeNode* root, int key) { del(root,key); return root; } void del(TreeNode* &root,int key) { if(!ro 阅读全文
posted @ 2023-06-04 15:13
穿过雾的阴霾
阅读(8)
评论(0)
推荐(0)
摘要:
```c class Solution { public: void dfs(TreeNode* root,int &sum)//从大到小遍历所有节点 { if(!root) return; dfs(root->right,sum); sum+=root->val; root->val=sum; d 阅读全文
posted @ 2023-06-04 14:16
穿过雾的阴霾
阅读(8)
评论(0)
推荐(0)

浙公网安备 33010602011771号