Count good nodes in a binary tree, according to LeatCode this is Microsoft’s most asked interview question of 2021 so far.
I think it’s a pretty good problem to understand. A lot of basic Tree fundamental knowledge can be gained from this problem.
So we’re given the root of a binary tree that is going to always be non-empty. We want to count the number of good nodes in the tree.
... Read More