Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 23:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



INFIX TO POSTFIX JAVA PROGRAMMING[HELP]

Discussion on INFIX TO POSTFIX JAVA PROGRAMMING[HELP] within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2009
Posts: 12
Received Thanks: 0
INFIX TO POSTFIX JAVA PROGRAMMING[HELP]

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 !
zepolzirk is offline  
Old 01/12/2012, 06:22   #2
 
xNopex's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 827
Received Thanks: 471
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.
xNopex is offline  
Thanks
1 User
Old 01/13/2012, 06:34   #3
 
Kinu's Avatar
 
elite*gold: 10
Join Date: May 2006
Posts: 2,786
Received Thanks: 773
that would be the simplest way
Kinu is offline  
Reply


Similar Threads Similar Threads
Java Programming Help Again please :'(
10/06/2011 - General Coding - 1 Replies
How do i do this program??? Create an array that will Input a year (valid years are starting from 1900 onwards) then output the index number and the animal sign of the entered year. These are the sequence of the animal signs: RAT, OX, TIGER, RABBIT, DRAGON, SNAKE, HORSE, SHEEP, MONKEY, ROOSTER, DOG, PIG. Sample output: Enter a year: 1200 <<VALID INPUT STARTS AT 1900>> Enter a year: 1984
Java Programming
10/11/2008 - CO2 Programming - 10 Replies
Hi guys, i am an experienced 2 year computer science HL java programmer :P just wondering where to start off to making programs for co? i wana make a new auto-clicker with timed clicks for intensify and a guard leveler :P



All times are GMT +2. The time now is 23:10.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.