Problem Statement Wrong & Confusing Test Cases


  • 0
    R

    The problem definition says "Given a binary search tree and a node in it ..."
    However in the test cases the given target is not always a node in the tree. We are expected to just check against the int value of the target node. Problem statement should say "given a target value ..."

    Also, I'm really confused by the test cases in this question.
    There should be 2 inputs: a tree and a target.
    Why are there 3 inputs in the below test cases ?

    Test Case 1:
    0
    [2,null,3]
    2

    Test Case 2:
    [2,1]
    1
    [2,null,3]

    Test Case 3:
    1
    [6,2,8,0,4,7,9,null,null,3,5]
    1


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.