1. You are given the design of two classes for the max, and min heap structures in the files minHeap.h,and maxHeap.h. Provide the implementation of these two classes in files minHeap.cpp, and maxHeap.cppin order to satisfy all the required functionalities defined in the header files for each one of the functions.Note, that you cannot use any additional headers than the ones already included in the code provided.2. Assume that you are given a stream of random numbers that you have to store. You are asked to find,and maintain the median value of these numbers, as new values are generated. The solution to thisproblem can be achieved with using two heaps, a min heap, and a max heap. The implementation of theheaps from problem 1 will be used. The outline of the code you will have to write for this, is provided inthe medianHeaps.h file. Provide the implementation of this header file in the file medianHeaps.cpp. A testcase has been provided in the main.cpp file, but feel free to write additional test cases to make sure yourcode works. (Additional test cases are not requested, and will not be graded). Note, that you cannot useany additional headers than the ones already included in the code provided.
CS590
[Solved] CS590 homework 3 Max, and Min Heaps
$25
File Name: CS590_homework_3__Max,_and_Min_Heaps.zip
File Size: 339.12 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.