// Count Good Nodes in Binary Tree — MEDIUM
// Category: tree
Given a binary tree root, a node `X` in the tree is named **good** if in the path from root to `X` there are no nodes with a value greater than `X`.
Return the number of good nodes in the binary tree.
For this problem, represent the binary tree as a level-order array where `-1` means null.
Example: root = [3,1,4,3,-1,1,5]
Output: 4