The Mutual Conversion Between an Expression and a Binary Tree

Mao Zhi-jun · Computer Knowledge and Technology · 2010

The concepts such as mathematical expression,stack operation and binary tree traversal must be presented in data structure. Evaluation of a mathematical expression is not only a basic problem in a programming language compiling,but also a typical example of stack application which could be used to develop all kinds of calculators (prefix calculator,infix calculator and postfix calculator). Mutual conversions between an expression and a binary tree remain unsolved in data structure,that is to say,it is impossible to obtain two kinds expressions from one expression. So it is difficult to work out the process of developing another two calculators. This paper discusses the mutual conversion between an expression and a binary tree so as to workout the other expressions from one expression and develop three kinds of different calculators with stack application.

Read the paper · More papers on PaperTik