Skip to content

Bug Report for valid-binary-search-tree #5924

Description

@hussam-salah

Bug Report for https://neetcode.io/problems/valid-binary-search-tree

Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.


The problem constraints are:

  • 1 <= The number of nodes in the tree <= 1000.
  • -1000 <= Node.val <= 1000

Although, in the code if I use these min and max values (-1000, 1000) to verify each node, it fails at test case 26, If I change my code to use min and max (Long.MIN_VALUE, Long.MAX_VALUE) it will pass, which means it’s the problem constraints aren’t matching the test cases.

Check screenshots attached.

Image Image 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