Is something wrong with this test case?


  • 0
    F

    My code passed many test cases but failed this one:

    Input: [1,2], 1
    Output: [[1]]
    Expected: []

    I'm a little bit confused. I think in this case the path that contains only the root node is the answer required, but the OJ says otherwise. Could anyone help me with this problem? Many thanks!


  • 0
    J

    Because the problem is looking for "root to leaf" lists, and since 1 isn't a leaf, then it shouldn't be an accepted output.


  • 0
    F

    Thanks! How silly I was to forget this point.


Log in to reply
 

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