(root, max, total)
| 11 | }; |
| 12 | |
| 13 | const count = (root, max, total) => { |
| 14 | const isBaseCase = root === null; |
| 15 | if (isBaseCase) return 0; |
| 16 | |
| 17 | return dfs(root, max, total); |
| 18 | } |
| 19 | |
| 20 | const dfs = (root, max, total) => { |
| 21 | const isGood = max <= root.val |