Input {-1,#} Output [-1] Expected {-1,#} How come?


  • 0
    F

    I got the following wrong answer.

    Input {-1,#} Output [-1] Expected {-1,#}

    What I don't understand is that why my output is surrounded by brackets not braces? Did this problem occur to anyone else?


  • 0
    S

    It would be better to present code. It could be wrong returning value.


  • 1
    F

    I know the answer to my own question now.
    That is I have some print statement in my code for debugging purpose, meanwhile when you have some print statement in your code, leetcode will actually take your print output as your final answer rather than return value. So...


Log in to reply
 

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