![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 03.04.2021 02:10, jc624826
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.
![answer](/tpl/images/cats/otvet.png)
Answers: 2
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 19:10, sammigrace5820
How might the success of your campaign be affected if you havenβt carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 11:00, swelch2010
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 20:00, noah12345678
What multimedia system creates an immersive, real-life experience that the user can interact with?
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 05:30, MOONCHILDSUGA
If you combine two cells into one, what action are you performing? a. adding a new row or column b. splitting the cells c. removing a new row or column d. merging the cells
Answers: 2
Do you know the correct answer?
Instructions
Submit your answers and code in Canvas. Do not submit the sample input files, submit o...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.11.2020 22:30
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.11.2020 22:30
![Konu](/tpl/images/cats/informatica.png)
Computers and Technology, 10.11.2020 22:30
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.11.2020 22:30
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/mkx.png)
Arts, 10.11.2020 22:30
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/biologiya.png)
Biology, 10.11.2020 22:30
![Konu](/tpl/images/cats/es.png)
Spanish, 10.11.2020 22:30