Assignment Question:View more random threads:
- cs403 assginment no 2 data base management spring 2011 idea...
- CS301 Data Structures Assignment No. 03 SEMESTER Fall 21...
- CS402 Theory of Automata Assignment No.4 Fall 2012 Due Date...
- CS614 Data Warehousing Assignment No. 03 Semester Spring...
- CS 610 Computer Networks Assignment # 05 Fall 2010 solution
- MTH202 Discrete Mathematics Spring 2011 Assignment no 1...
- CS604 Operating Systems vu current Assignment No 5 Spring...
- CS502 Fundamental of Algorithms Assignment No.1 Spring...
- assignment1 mth 202 fall 2011
- CS401 Computer Architecture and Assembly Language...
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()
buildMinHeap()
maxHeapify()
minHeapify()
buildMaxHeap() function is used to build MaxHeap.
buildMinHeap() function is used to build MinHeap.
Sponsored Links
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)