Solved–Homework 5 –Solution

$30.00 $19.00

Name your implementation file as LastName(3 to 5 letters)_FirstNameInitial_HW5_QX.cpp Note: You can only use iostream, cassert, cctype, cmath, cstdio, and cstdlib. Create a template class called btNode with the following: Non-member template functions for in/post/pre-order traversal Non-member functions for a tree to print, copy, height, and number of nodes. Create a template class for a…

You’ll get a: . zip file solution

 

 
Categorys:
Tags:

Description

5/5 – (2 votes)

Name your implementation file as LastName(3 to 5 letters)_FirstNameInitial_HW5_QX.cpp Note: You can only use iostream, cassert, cctype, cmath, cstdio, and cstdlib.

  1. Create a template class called btNode with the following:

    1. Non-member template functions for in/post/pre-order traversal

    2. Non-member functions for a tree to print, copy, height, and number of nodes.

  1. Create a template class for a binary tree using btNode (Q1) with the spec in the given header file.

  1. Create a template class for a binary tree using dynamic array with the spec in the given header file.

  1. Create a template class for a Binary Search Tree using the btNode binary tree class (Q2).

    1. Member functions to add, remove, minimum, maximum, and search.

  2. Create a template class for a Heap using just a dynamic array.

    1. Member functions to add, remove, minimum, and maximum.

    2. Heapsort, return a sorted array.