|
Show Bid Request
C++ Tree
Bid Request Id: 57443
|
|
|
Posted by: |
destiny (3 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 0.00%
|
Buyer Security Verifications: |
Unverified
|
Approved on: |
Apr 11, 2003 11:53:37 PM EDT
|
Bidding Closes: |
Apr 12, 2003 11:00:00 PM EDT
|
Viewed (by coders): |
93 times
|
Deadline: |
4/13/2003
TIME EXPIRED
|
|
|
|
Description:
Recursion may be used througout
On the next page of this handout is a tree.h file. Your project will
contain this file plus two others: a tree.cpp file and a driver.cpp file. -
Your tree.cpp file will contain the implementations for the files that are
prototyped in the tree.h file.
1. AddToOrderedList( ) adds the second parameter to the list in
order.
2. PrintList() prints the entire list from the first node to the end node.
3. MakeBalancedTree ( ) creates a new balanced binary tree which
will be pointed to by the second parameter, using the data from the
ordered linked list (pointed to by the first parameter) whose length
is the third parameter.
4. CountList() returns the number of nodes in the list.
5. PrintTree() outputs the data in the tree using an inorder traversal.
6. Depth() returns the depth of the tree.
Your driver.cpp file contains a main() function. Your main() should:
1. create an empty linked list and an empty tree.
2. prompt the user for integers (zero when done).
3. add the integers to the linked list in order.
4. print the list.
5. make a balanced binary search tree from the data in the ordered
linked list.
6. print the tree in order.
7. find and output the depth of the tree.
8. print the linked list again to make sure you did not alter it.
//tree.h
#include<stddef.h>
#include<iostream.h>
struct ListNode
{
int data;
ListNode* linl;
};
struct TreeNode
{
int data;
TreeNode* left;
TreeNode* right;
};
void AddToOrderedList(ListNode* & head,int x);
void PrintList(ListNode* head);
void MakeBalancedTree(ListNode* head,TreeNode*& root,int count);
int CountList(ListNode* head);
void PrintTree(TreeNode* root);
int Depth(TreeNode*root);
Deliverables: 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Complete ownership and distribution copyrights to all work purchased.
Platform:
MS VISUAL C++ Windows ME
Must be 100% finished and received by buyer on:
Apr 13, 2003 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.
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!
|
$10 (USD)
|
Apr 12, 2003 4:22:05 AM EDT
|
9.67
(Excellent)
|
|
|
I have great experience with this kind of project and I can solve your problem within a few hours. I'm the man for the job.
|
|
|
|
|
|
|