Find Jobs
Hire Freelancers

C++ Tree

$10-15 USD

Terminado
Publicado hace alrededor de 21 años

$10-15 USD

Pagado a la entrega
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 del proyecto: 2924671

Información sobre el proyecto

4 propuestas
Proyecto remoto
Activo hace 21 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
See private message.
$7 USD en 14 días
5,0 (18 comentarios)
3,5
3,5
4 freelancers están ofertando un promedio de $9 USD por este trabajo
Avatar del usuario
See private message.
$8,50 USD en 14 días
4,6 (148 comentarios)
6,1
6,1
Avatar del usuario
See private message.
$12,75 USD en 14 días
5,0 (8 comentarios)
3,2
3,2
Avatar del usuario
See private message.
$5,95 USD en 14 días
0,0 (1 comentario)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
United States
5,0
5
Miembro desde mar 9, 2003

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.