-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
Bug Report for https://neetcode.io/problems/count-good-nodes-in-binary-tree
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
In the question it says that a good node is one whose value is not lower than any node which comes between the root node and good node.
But in the first example with value root = [2,1,1,3,null,1,5] . The value is 3 . and the good node can be a non-leaf node as well. Considering the conditions it should be 5. its either that the condition should be no node should have a value smaller than the root node and greater than the targeted node for the targeted node to be good node .
Kindly check and let me know on this

Metadata
Metadata
Assignees
Labels
No labels