Find Jobs
Hire Freelancers

C++ Tree

$10-15 USD

完了済み
投稿日: 21年近く前

$10-15 USD

完了時にお支払い
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 [login to view URL] file and a [login to view URL] file. - Your [login to view URL] 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 [login to view URL] 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 #include 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
プロジェクト ID: 2924671

プロジェクトについて

4個の提案
リモートプロジェクト
アクティブ 21年前

お金を稼ぎたいですか?

Freelancerで入札する利点

予算と期間を設定してください
仕事で報酬を得る
提案をご説明ください
登録して仕事に入札するのは無料です
アワード者:
ユーザーアバター
See private message.
$7 USD 14日以内
5.0 (18 レビュー)
3.5
3.5
この仕事に4人のフリーランサーが、平均$9 USDで入札しています
ユーザーアバター
See private message.
$8.50 USD 14日以内
4.6 (148 レビュー)
6.1
6.1
ユーザーアバター
See private message.
$12.75 USD 14日以内
5.0 (8 レビュー)
3.2
3.2
ユーザーアバター
See private message.
$5.95 USD 14日以内
0.0 (1 レビュー)
0.0
0.0

クライアントについて

UNITED STATESのフラグ
United States
5.0
5
メンバー登録日:3月 9, 2003

クライアント確認

このクライアントからの他の仕事

linked list of string objects
$5-10 USD
Line Editor
$5-10 USD
ありがとうございます!無料クレジットを受け取るリンクをメールしました。
メールを送信中に問題が発生しました。もう一度お試しください。
登録ユーザー 投稿された仕事の合計
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。