subject

Instructions Submit your answers and code in Canvas. Do not submit the sample input files, submit only the .hpp and .cpp files (all of them, even if you do not modify the ones we are providing). Please put down your name in comments at the beginning of all the source code files. Include a brief README file explaining your code, especially if you implemented some of the suggestions for extra credits.
Question
Implement Max Heap and HeapSort. In assignment4.zip, we are providing you with the following files: public/ demo. cpp <-main method to try your implementation maxheap. cpp <-implementation of maxheap (only file you need to modify) maxheap. hpp <-header file inputs <-folder with several sample inputs
To compile, run $ g++ -o heapsort demo. cpp maxheap. cpp .To test your implementation with a sample input file, run $ ./heapsort inputs/input. 10.1 This will test a few methods (you need to check the maxheap after each step manually) and run heapsort (the code will check whether the output is sorted automatically).
To test your implementation with all sample files with one command, run time for f in inputs/input. 10*; do echo $f; ./heapsort $f; done The command time will let you know how long it took to run the code. You may want to store the output in a file so that you can look at it carefully: time for f in inputs/input. 10*; do echo $f; ./heapsort $f; done > output Grading If you implement all the methods in maxheap. cpp properly (i. e., the demo works for any sample input), you will get 100. You also have a few opportunities to earn extra credits:
Implement and test additional methods. For example, implement and test deleteMin.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:50
What is a rush associated with alcohol?
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Which boolean operator enables you to exclude a search term? a} not b} and c} or d} plus
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
These statements describe lists in presentation programs: a. bullets can be turned off and on. b. bullets cannot be turned off. c. bullet styles, colors, and sizes can be changed. d. lists don't have to use bullets or numbers. e. numbering styles, colors, and sizes can be changed. f. numbers can be turned off and on. g. numbers cannot be turned off. select all that apply
Answers: 2
You know the right answer?
Instructions Submit your answers and code in Canvas. Do not submit the sample input files, submit o...
Questions
question
History, 28.04.2021 04:40
question
Mathematics, 28.04.2021 04:40
question
Mathematics, 28.04.2021 04:40
question
Chemistry, 28.04.2021 04:40
question
Mathematics, 28.04.2021 04:40
question
Physics, 28.04.2021 04:40
Questions on the website: 13722367