1448 Count Good Nodes in Binary Tree
Warning
This post is more than a year old. Information may be outdated.
Solved at: 220827
Question
Given a binary tree root, a node X in the tree is named good if in the path from the root to X there are no nodes with a value greater than X.
Return the number of good nodes in the binary tree.
Solution
Backlinks1
Coding TestsComments