0
2.2kviews
What is Expression tree? Give Example.
1 Answer
written 7.9 years ago by |
Arithmetic expressions can be represented by using binary tree, for example: E = (a–b)/ ((c*d) + e) can be represented as:
This kind of tree is called an expression tree. Here the terminal nodes (leaves) are the variables or constants in the expression (a,b,b,d, and e)and the non-terminal nodes are the operator in the expression (+, –,* , and /).