Find Jobs
Hire Freelancers

C++ Tree

$10-15 USD

Завершено
Опублікований about 21 years ago

$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 yrs ago

Хочете заробити?

Переваги подання заявок на 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
На сайті з бер. 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)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.