Some test cases really don't make sense


  • 0
    B

    [1]
    [[1,1]]
    If I understand correctly, we can reconstruct the only sequence [1] with sequence [1,1]. But the test cases indicates this is false. Any idea?


  • 0
    B

    Another example
    [5,6,2,7]
    [[5,6],[6,2],[2,7]]

    [5,6,2,7] can be uniquely reconstructed from [[5,6],[6,2],[2,7]] through 5->6->2->7. But the expected answer return false. Please fix it or make it more clear.


  • 0

    @batilei The description mentions that org array is a permutation from 1 to n. So [5,6,2,7] is not a valid input.


Log in to reply
 

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