3 ms·
(Author here) Oh that's pretty clever and better than my approach. I was going to point out that subtraction would still need to be supported but realized we do
by dangoldin 7y ago
(Author here) Oh that's pretty clever and better than my approach. I was going to point out that subtraction would still need to be supported but realized we don't need to support negative numbers.
- sgdpk 7y agoExactly :) The polish notation approach is also pretty interesting. I wasn't aware it had the full power of parenthesized expressions. If you are interested I can share my code (simple Python).