Test case: "+-2" what is that stand for?why expect "0"


  • 0
    B

    I don't understand that the meaning of test case "+-2" is "(+)(-2)" or "(+2)-2"??


  • 0
    F

    The hint doesnt even say that this case makes sense. It specifically says "Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value." which I interpret as max one + or - ...


Log in to reply
 

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