Skip to content

Bug Report for closest-binary-search-tree-value #5868

@AnonymousAnion

Description

@AnonymousAnion

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

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

The test suite should include the edge case of when the target is equidistant from two nodes, but one of those nodes is smaller than the other to account for this part of the problem description: "... If there are multiple answers, print the smallest." For example, a good test case would be a root of 4 with a leaf of 3.

Currently, programs can pass without accounting for this specified case.

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