Show Bid Request
easy java project
Bid Request Id: 22608
|
|
|
Posted by: |
elohmrow (7 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 16.67%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Jul 23, 2002 8:48:33 PM EDT
|
Bidding Closes: |
Jul 24, 2002 9:52:51 PM EDT
|
Viewed (by coders): |
240 times
|
Deadline: |
7/26/2002 12:00:00 PM
TIME EXPIRED
|
|
|
|
Description:
Any tree can be transformed into a binary (here "binary" means that every node has at most two children) tree by first deleting from each node all the links to its children except the link to its leftmost child, and then setting a link from each node to its immediate right sibling.
a) Write a procedure which takes a tree as input and produces its corresponding binary tree. The input tree is given by listing, for every node, the children of that node. Nodes are represented by integers. For example, the following representation:
1 2 3 4 5 2 6 3 7 8
denotes a tree having a root 1 with children 2,3,4 and 5; node 2 has one child, i.e., node 6; node 3 has children 7 and 8. Leaves (nodes with no children) will not have a separate input line; they will merely appear on the child list of another node. For simplicity you may assume that the nodes of the tree will be input in level order.
b) Let now T be a tree and F be the binary tree equivalent to T under the above transformation. Write a function that accepts F as input and returns the height of T.
c) Write a procedure that accepts F and a node v and returns first all the descendants of v in T and then all the ancestors of v in T. The ancestors of v in T must be output with the following format: print the list of all the ancestors of v in F; in this list, mark the ancestors of v in T by appending an asterisk to each.
To test your procedures, your main program should call all three procedures and print their results. Specifically,
a) Call the first procedure to read in a tree and produce a binary tree. Following this, print out the newly created binary tree in both preorder and postorder. For listing purposes, consider the leftmost-child to be the left child and the right-sibling to be the right child of a node. As you know, a preorder and postorder listing uniquely identifies a binary tree. (You will probably wish to write separate auxiliary procedures to do the predorder and postorder listings.)
b) Call the second function to determine the tree's height and print out the resulting value.
c) Call the third procedure three times, once each with the nodes labeled 1, 2, and 3. Print the results for each of these 3 calls.
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Complete copyrights to all work purchased.
Platform:
UNIX
needs to run from both the command line and an input file.
For an experienced coder (5+ years), this will take you 15 minutes to complete. It would take me about 10 hours, and I don't have 10 hours to spare!
Must be 100% finished and received by buyer on:
Jul 26, 2002 12:00:00 PM EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Special Conditions / Other:
Must be finished by 7/26/02 12:00:00 PM. This is a very easy project that I do not have the time to work on. I have other projects more important to do. An experienced code will finish this in less than a half-hour. Bidding will close down early.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$25 (USD)
|
Jul 24, 2002 3:23:28 AM EDT
|
9.82
(Excellent)
|
|
|
Dear sir,
I can do this project for you. You will have code in a few hours.
I have strong experince with JAVA and such kind or problems.
Regards,
Marius. |
|
|
|
|
|