Count Good Nodes in Binary Tree
Walk down the tree carrying the largest value seen on the path; a node is good when it is at least that large.
Walk down the tree carrying the largest value seen on the path; a node is good when it is at least that large.