max_depth) and the sum of the values of the deepest leaves (deepest_sum).max_depth, update max_depth and reset deepest_sum to the current node's value.
ii. If the current depth is equal to max_depth, add the current node's value to deepest_sum.
c. If the current node has a right child, push it onto the stack with a depth one greater than the current depth.
d. If the current node has a left child, push it onto the stack with a depth one greater than the current depth.deepest_sum.