Does C# version have some problem?


  • 0
    G

    C# version indicates seqs is a 2D array:
    SequenceReconstruction(int[] org, int[,] seqs)

    However, the failed cases indicates it is actually jagged array which should be defined something like this?
    SequenceReconstruction(int[] org, int[][] seqs)

    Input:
    [1,2,3, 4, 5]
    [[1,2,3,4],
    [1,2,3],
    [1],
    [4],
    [5]]


  • 1

    @goldsteed I have fixed this by changing the seqs type to be a list of list of strings instead of 2d array. Could you please try again?


  • 0
    G

    Yes, it worked. Thanks for changing that. Also, I think a jagged array should be fine too.

    Thanks,


Log in to reply
 

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