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