Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1448. Count Good Nodes in Binary Tree
Count how many nodes in a binary tree are "good", meaning their value is at least the maximum value seen on the path from the root to that node. This is solved by a tree traversal (DFS/BFS) that carries the current path maximum and increments the count when a node's value >= that maximum; n up to 10^5.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.