1448 Count Good Nodes in Binary Tree
Warning
This post is more than a year old. Information may be outdated.
Backlinks1
Coding TestsComments
Solved at: 220827
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.
436 ms, faster than 36.72% of Python3 online submissions for Count Good Nodes in Binary Tree.
32.6 MB, less than 45.65% of Python3 online submissions for Count Good Nodes in Binary Tree.
No comments yet. Be the first to share your thoughts.