Wrong instructions/requirements and the test cases are whack (Ruby)

  • -1

    It specifically says return length:

    "return the new length"


    "Your function should return length = 2, with the first two elements of nums being 1 and 2 respectively. It doesn't matter what you leave beyond the new length. "

    But when I run the code, it gives some crazy output, saying I was returning an empty array. And when I submit a solution, I get this nonsense:


    So, something is off

Log in to reply

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