B
badasspirate
Hey all,
I am looking for some programmers with sufficient qualifications who
would like to join a freelancing programming group, either as a quick
way to make money, or something to do on the side. Anyway, I am really
optimistic about the possibilities that could arise from forming a
programming group (friends, MONEY, etc) and would like to get it
started. If you are interested, just solve this (intermediate skill)
programming problem and send me an email at (e-mail address removed) with
the subject "Wallys Traversal's".
------------------------------------------------------------------------------------
Problem Statement: Given a rooted, binary tree T, write a program that
prompts the user to enter the preorder traversal of T and the inorder
traversal of T. The program should then output the postorder traversal
of T.
You may assume that each node is represented by a character. So a
traversal (whether preorder, postorder, or inorder), is expressed as a
string.
Suppose Wally walks the tree:
a
/ \
/ \
b c
/ \ \
/ \ \
d e f
/
/
g
Here is an example of how the program should work:
Enter preorder traversal of T: abdecfg [Press Enter]
Enter inorder traversal of T: dbeacgf [Press Enter]
Given the preorder traversal abdecfg and the inorder traversal dbeacgf,
I
conclude that the postorder traversal order of T is: debgfca
Your program does not have to provide any error-checking.
------------------------------------------------------------------------------------
The only reason I am including this is to keep away newbies from
joining the group. Just send me the compiled (or source code) .class
(or .java) files in an email if you are interested.
Sincerely,
Eric
I am looking for some programmers with sufficient qualifications who
would like to join a freelancing programming group, either as a quick
way to make money, or something to do on the side. Anyway, I am really
optimistic about the possibilities that could arise from forming a
programming group (friends, MONEY, etc) and would like to get it
started. If you are interested, just solve this (intermediate skill)
programming problem and send me an email at (e-mail address removed) with
the subject "Wallys Traversal's".
------------------------------------------------------------------------------------
Problem Statement: Given a rooted, binary tree T, write a program that
prompts the user to enter the preorder traversal of T and the inorder
traversal of T. The program should then output the postorder traversal
of T.
You may assume that each node is represented by a character. So a
traversal (whether preorder, postorder, or inorder), is expressed as a
string.
Suppose Wally walks the tree:
a
/ \
/ \
b c
/ \ \
/ \ \
d e f
/
/
g
Here is an example of how the program should work:
Enter preorder traversal of T: abdecfg [Press Enter]
Enter inorder traversal of T: dbeacgf [Press Enter]
Given the preorder traversal abdecfg and the inorder traversal dbeacgf,
I
conclude that the postorder traversal order of T is: debgfca
Your program does not have to provide any error-checking.
------------------------------------------------------------------------------------
The only reason I am including this is to keep away newbies from
joining the group. Just send me the compiled (or source code) .class
(or .java) files in an email if you are interested.
Sincerely,
Eric