Question: What is Expression tree? Give Example.
0
expression tree • 762 views
ADD COMMENTlink
modified 17 days ago by gravatar for Sanket Shingote Sanket Shingote ♦♦ 290 written 2.9 years ago by gravatar for Juilee Juilee2.5k
0

Arithmetic expressions can be represented by using binary tree, for example: E = (a–b)/ ((c*d) + e) can be represented as:

enter image description here

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 /).

ADD COMMENTlink
written 2.9 years ago by gravatar for Juilee Juilee2.5k
Please log in to add an answer.