A Simple Tree Problem Time Limit: 3000ms Memory Limit: 65536KB This problem will be judged on ZJU. Original ID: 368664-bit integer IO format: %lld Java class name: Main Prev Submit Status Statistics Discuss Next Type: None None Graph Theory 2-
[抄题]: 给定二叉搜索树(BST),将其转换为更大的树,使原始BST上每个节点的值都更改为在原始树中大于等于该节点值的节点值之和(包括该节点). Given a binary search Tree `{5,2,13}`: 5 / \ 2 13 Return the root of new tree 18 / \ 20 13 [暴力解法]: 时间分析: 空间分析: [思维问题]: [一句话思路]: 反向求和并把和赋给root.val [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情