There are enough resources on how to convert an expression tree into postfix notation, and it’s not that hard.
But I have to parse a postfix expression into an expression tree.
The expression is:
A 2 ^ 2 A * B * – B 2 ^ + A B – /
I don’t really have a clue on how to interpret the expression. Does someone has a clue on how to proces this?
Create a stack containing nodes that could be part of a tree
For your data:
Here is a LINQPad program that can be experimented with:
Output: