Assignment Question:View more random threads:
- CS605 Software Engineering II Assignment No.3 Fall Semester...
- mth101 assignment no 1 spring 2011 idea solution by vuhelp
- Advance Computer Architecture - CS501 assignment no 3...
- CS502 assignment no 2 spring 2011
- CS502 Fundamentals of Algorithms Spring 2011 ASSIGNMENT4...
- cs401 assignment 03 required
- CS615 Software Project Management assignment no 4 fall 7...
- CS607 Assignment No. 04 Solution soon fall Due Date 9...
- cs606assignment no 2 spring 2011 MAY Solution
- cs201 assignment no 1 April 12 Spring 2011
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
Solution Guidelines:
Your solution should contain the following functions:
buildMaxHeap()
Sponsored Links
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)