参考题解:【宫水三叶】DFS 模拟题
设计函数 int dfs(int l, int r, Map<String, Integer> map)
函数,代表计算 s[l...r]
的结果,答案为 dfs(0,n-1,map)
,其中 n 为字符串的长度。
getRight 函数作用,其实就是从 left 出发,找到合法的「子表达式」或「值」为止。
(let x 2 (mult x (let x 3 y 4 (add x y))</
参考题解:【宫水三叶】DFS 模拟题
设计函数 int dfs(int l, int r, Map<String, Integer> map)
函数,代表计算 s[l...r]
的结果,答案为 dfs(0,n-1,map)
,其中 n 为字符串的长度。
getRight 函数作用,其实就是从 left 出发,找到合法的「子表达式」或「值」为止。
(let x 2 (mult x (let x 3 y 4 (add x y))</