plz i cant understand the stack operations,and iwant to know if the code is written in c or c++?
Converting and Evaluating Infix, Postfix and Prefix Expressions in C
#17
Posted 24 November 2011 - 05:30 PM
Thanks born2code, it's rare to find a clear explanation such as yours on topics such as this.
Appreciate your hard work.
I'll have to poke around at the code later, came here for the explanation of infix - prefix - postfix.
I'd add that after making an expression tree from a given expression, to produce the prefix notation, you write down the element the first time it is seen during traversal, for postfix, you write it down the last time it is seen during traversal. That is how it clicked for me.
Appreciate your hard work.
I'll have to poke around at the code later, came here for the explanation of infix - prefix - postfix.
I'd add that after making an expression tree from a given expression, to produce the prefix notation, you write down the element the first time it is seen during traversal, for postfix, you write it down the last time it is seen during traversal. That is how it clicked for me.
|
|






MultiQuote


|