Hi, mates!
I want to create a binary tree, from given arithmetic expression (including numbers, operator : '+', '-', '+', '/' and brackets) and then evaluete it.
I wrote the TreeNode class and evaluating functions. But my problem is how to recongnise the parts of the expreesiong given... I already wrote a function that checks if the brackets are put correctly... but i couldn't go any further.
Any ideas will be appreciated.
Thank you in advance !
I agree with you, Zaita. But i wasnt trying to spam the forum. When i search the web for such kind of problem i find everything about evaluating math expression in a tree, but ideas for parsing string(the expression) to a binary tree:(
Sorry if i asked a trivial question.