The example 2 is not correct!


  • 0
    Q

    example:"23-45"
    gives 5 way:
    (2*(3-(45))) = -34
    ((2
    3)-(45)) = -14
    ((2
    (3-4))5) = -10
    (2
    ((3-4)5)) = -10
    (((2
    3)-4)*5) = 10

    But you need consider:

    23-(45)=-14

    Which has same answer like (23)-(45)=-14
    But not the same. In the first one, we get 45 firstly. In the other hand, we get 23 firstly.

    Why * is missing?


Log in to reply
 

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