INFIX TO POSTFIX JAVA PROGRAMMING[HELP]

01/12/2012 03:38 zepolzirk#1
Good Day Elitepvpers. Can some of you give me a source code of converting infix to postfix ? and also postfix to infix. I just badly need it. I'm still using search engines now. And also i need some helping hands here. I need a program with an input process.

Sample Program:

Input : (a+b)*c/(d+e)*f
Output: ab+c*de+f*/

Hope u can help me with these. Thank you !
01/12/2012 06:22 xNopex#2
Create a new tree object and fill the tree like this (input: ((a+b)*c)/((d+e)*f)):

Code:
           '/'
        /        \
       '*'         '*'
     /   \      /   \
    '+'    c   '+'     f
  /   \         /\
 a    b       d  e
And now simply use postorder Traversal.
01/13/2012 06:34 Kinu#3
that would be the simplest way :)