data structures - Converting an expression to binary tree -


how convert following expression binary tree?

((a + b)/(c * d + e)*(f - g))

according order of operations, last operation? multiplication * between (a+b)/(c*d+e) on 1 hand , (f-g) on other. root node of tree have operation *, while left branch have (a+b)/(c*d+e) , right branch have (f-g). ask same question on each of branches, etc., until reach leaves of tree letters a, ..., g.


Comments