Assignment Question:View more random threads:
- CS403 Database Management Systems Assignment NO.2 Solution...
- Fundamentals of Algorithms CS502-Spring solution fall 2010
- CS302- Digital Logic Design Assignment 3 solution fall 2010
- CS604-Operating Systems Assignment No. 5 Fall 2013 Due Date...
- CS507 Assignment No. 3 idea solution spring June 2011
- CS605 Software Engineering II Assignment No.3 Fall Semester...
- CS402 theory of Automata assignmment no 4 fall January 2012
- CS401 Computer Architecture and Assembly Language...
- cs401 visual programming assignment 2 fall 2010
- cs402 assignment no 3 solution fall 2010
Suppose we want to develop software for token machine of ABC bank. At entrance, token machine generates token for each customer. The first 10 customers received the following token numbers:
00, 11, 22, 33, 44, 55, 66, 77, 88 and 99
Students are required to write C++ code in order to:
Build a Min heap from the above data
Build a Max heap from the above data
Sponsored Links
Solution Guidelines:
Your solution should contain the following functions:
buildMaxHeap()
buildMinHeap()
maxHeapify()
minHeapify()
buildMaxHeap() function is used to build MaxHeap.
buildMinHeap() function is used to build MinHeap.
maxHeapify() function is used to arrange the values according to the max heap property.
minHeapify() function is used to arrange the values according to the min heap property.
In main() function, declare an array of 10 elements of integer type. Assign the values as given in the sample output.
Then call the buildMaxHeap() function and print the max heap values as given in the sample output.
Then call the buildMinHeap() function and print the min heap values as given in the sample output.