(TreeNode root)
| 21 | int sum = 0; |
| 22 | |
| 23 | public int sumNumbers(TreeNode root) { |
| 24 | traverse(root, 0); |
| 25 | return sum; |
| 26 | } |
| 27 | |
| 28 | public void traverse(TreeNode root, int n) { |
| 29 | // if the node is null, return from the function (specially to handle if root of |