Hi, I need to get four things from the binary tree
- infix arithmetic expression GOT IT and tested:
-4*(-5-2)/(-1*x-(-3))
- Eval the expression with x = -1 GOT IT and tested:
7
- infix arithmetic expression like if instead * is +
I tried to make this but all wrong:
-4+(-5-2)/(-1+x)-(-3)
-4+(-5-2)/((-1+x)-(-3))
-4+(-5-2)/(-1+x-(-3))
-4+(-5-2)/(-1+x)-(-3)
-4+(-5-2)/-1+x-(-3)
-4+(-5-2)/((-3)-(-1+x))
-4+(-5-2)/(-3)-(-1+x)
(-5-2)+(-4)/((-1+x)-(-3))
(-5-2)+(-4)/(-1+x-(-3))
(-5-2)+(-4)/(-1+x)-(-3)
(-5-2)+(-4)/-1+x-(-3)
(-5-2)+(-4)/((-3)-(-1+x))
(-5-2)+(-4)/(-3)-(-1+x)
Get the postfix arithmetic expression, I think should be this but no, is wrong too:
45-2-1x-3--/-
-4-52--1-3/
I hope you can help me. Thanks
I tried to make this but all wrong
I made that, tried to replace the * with +, but not working, I don't know that i'm doing wrong.