• Custom User Avatar

    You had already added the original signature array to result, but you did it again in hte corresponding loop when n < 3.

    Also, Your code fails for cases like signature = [2, 0, 1] and n = 2. The expected result should be [2, 0] but your code returns [2, 0, 1]

    Read this instruction carefully --> returns the first n elements - signature included of the so seeded sequence.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution