Assignment Question:View more random threads:
- CS401 Assignment No 01 Solution Spring Semester April 2013...
- Virtual University MCS assignments solutions
- CS614 Data Warehousing VU Assignment No 4 Spring June 2012...
- Assignment No.4 (Course STA301) Fall 2010 (Total Marks 30)
- CS504 Software Engineering-1 Assignment no 2 idea...
- CS501 - Assignment 5 Solution Spring 2011 - June 2011
- CS507 Information Systems Assignment No.3 Solution Spring...
- cs507 information systems Assignment no 3 Solution January...
- cs501 Assignment no 3 Solution 20th January 2016
- final term paper
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:
Sponsored Links
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)