subject

Write a heapsort program that generates random numbers and insert them in heap. the
program then performs heapsort to sort the numbers in ascending order. implement the heap
using an array and compare its performance to stl heap implementation.
requirements:
1. use random number generator to generate integers numbers in range [0..1000]. your
program should prompt the user for the total number of numbers to generate. a listing
of the generated numbers should be printed on screen in the order they are generated.
allocate a dynamic array to store the numbers.
2. construct the heap by performing the heapify algorithm.
3. once the heap is constructed, perform heapsort algorithm and display the sorted list on
screen.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
What’s the process of observing someone actually working in a career that interests you?
Answers: 1
question
Computers and Technology, 21.06.2019 23:00
What computer network component allows data transfers from one computer to another through a telephone line?
Answers: 1
question
Computers and Technology, 22.06.2019 13:30
Asoftware company hired ray, a college graduate to work in their development team. ray is assigned to work in the coding phase of a project. what happens during the coding phase of a software development project? a. the customer receives a working model of the software. b. developers convert the program design into code. c. developers gather requirements directly from the stakeholders. d. testing teams check the product for quality.
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Ou listened to a song on your computer. did you use hardware or software?
Answers: 2
You know the right answer?
Write a heapsort program that generates random numbers and insert them in heap. the
program th...
Questions
question
Mathematics, 21.02.2020 23:34
question
Mathematics, 21.02.2020 23:34
question
History, 21.02.2020 23:34
Questions on the website: 13722359