hii,
i have problem writing a binary tree program.actually we can directly search and insert left and right node for any normal expression with left child being less than and the right side being greater than the parent.but i am not getting the logic for search and insert for an arithemetic expression with precedence like a+b*c-d;
here the tree will be like
how can we construct such a tree.like we need to parse the entire expression before deciding even the root.Code:+
a -
* d
b c
please help me out with this
regards,
cutelucks