ngocpv
October 17th, 2006, 10:47 AM
Hi all !
I have the following problem when doing my big exercise on subject of Data Structure and Algorithm : Input an arbitrary characters string from keyboard then identify which mathematics function that characters string represents , what is its variables . Finally , plot that function on screen .
For example , for characters string : "sin(x)+2*cos(x)+3*exp(x)" , the following results must be taken :
* function : f(x)=sin(x)+2*cos(x)+3*exp(x)
* variable : x
Ploting a function is easy since it's fully identified .
I don't know which data structure (stack , queue...) is best suited for this problem and how to do it . Is there any one can help me ?
Thanks in advance !
I have the following problem when doing my big exercise on subject of Data Structure and Algorithm : Input an arbitrary characters string from keyboard then identify which mathematics function that characters string represents , what is its variables . Finally , plot that function on screen .
For example , for characters string : "sin(x)+2*cos(x)+3*exp(x)" , the following results must be taken :
* function : f(x)=sin(x)+2*cos(x)+3*exp(x)
* variable : x
Ploting a function is easy since it's fully identified .
I don't know which data structure (stack , queue...) is best suited for this problem and how to do it . Is there any one can help me ?
Thanks in advance !