Skip to content

Bug Report for count-good-nodes-in-binary-tree #4466

@devacius

Description

@devacius

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

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy