Is zero allowed to put at the first position of final output ?


  • 0
    C
    [0,0,0,0]
    [0,0,0,0,1]
    6
    

    I just tested the expected output for the input above is [0,1,0,0,0,0]. However in that case, 010000 can't be claimed as a number. Does it mean this solution behind the testing system is wrong?


  • 0

    No, your input is wrong.

    Or at least you should think so yourself. Why do you say 010000 can't be claimed as a number? Because of the leading zero? Then why did you yourself enter leading zeros in the input?


Log in to reply
 

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