(root, max = -Infinity, total = [ 0 ])
| 5 | * @return {number} |
| 6 | */ |
| 7 | var goodNodes = function(root, max = -Infinity, total = [ 0 ]) { |
| 8 | count(root, max, total); |
| 9 | |
| 10 | return total[0] |
| 11 | }; |
| 12 | |
| 13 | const count = (root, max, total) => { |
| 14 | const isBaseCase = root === null; |