Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Doesn't work #1

Open
yuriyzubarev opened this Issue · 1 comment

1 participant

@yuriyzubarev

Try this and you will see:

assert infix_to_prefix("a+b") == "ab+"
assert infix_to_prefix("(a+(b*c))") == "abc*+"
assert infix_to_prefix("((a+b)*(z+x))") == "ab+zx+*"
assert infix_to_prefix("((a+t)*((b+(a+c))^(c+d)))") == "at+bac++cd+^*"
assert infix_to_prefix("c+d*b/(a-e)^b^c") == "cdb*ae-bc^^/+"

First of all parsing is not problem free. Once you get passed it, the algorithm itself is flawed.

Your work is referenced from Wikipedia, you better fix it up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.