Ad
  • Default User Avatar

    You are right. Sorry for the inconvenience. I intuitively though about valid arithmetic operations

  • Custom User Avatar

    I've added a test for "9", and it works correctly for my solutions in both JavaScript and Python. Note that numbers are defined as as a sequence of digits (with an optional decimal part), and no unary minus operator is defined. Your second two expressions are therefore not valid inputs.

  • Default User Avatar

    Hello, awesome test.

    The are 3 cases that failed on present solutions at the time I am writing this.

    [expression, expected]
    ["9", 9]
    ["-9", -9]
    [ '-9/-3*4', 12 ]