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, 22.06.2019 09:00
Designing a mobile web page is a little different from designing a regular web page. name at least three features that should be considered when designing a website that is mobile phone-friendly, and briefly explain why they are important.
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Selling a product through an electronic medium is
Answers: 1
question
Computers and Technology, 23.06.2019 05:20
What did creator markus “notch" persson initially call his game
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
You know the right answer?
Write a heapsort program that generates random numbers and insert them in heap. the
program th...
Questions
question
Mathematics, 26.01.2021 06:10
question
Mathematics, 26.01.2021 06:10
question
Mathematics, 26.01.2021 06:10
question
Social Studies, 26.01.2021 06:10
question
Mathematics, 26.01.2021 06:10
question
Social Studies, 26.01.2021 06:10
Questions on the website: 13722363