Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement Heap (constructors, trickleUp and trickleDown), MyPriorityQueue (constructor, offer, poll, peek and isEmpty) and HeapSort (using heap directly or using PriorityQueue.poll). Comparators should be used.(Do

Implement Heap (constructors, trickleUp and trickleDown), MyPriorityQueue (constructor, offer, poll, peek and isEmpty) and HeapSort (using heap directly or using PriorityQueue.poll). Comparators should be used.(Do not forget about the methods in the Heap, MyPriorityQueue and HeapSort as they are all required.)

I need help. I tried to run these two classes (Copy the links down below and paste them on the address bar

Heap: https://pastebin.com/RShcqnCe

MypriorityQueue: https://pastebin.com/4q5q2cnS

but I got errors. 8 errors for Heap and 10 errors for MyPriorityQueue

Link to the errors: https://pastebin.com/KsSZ2znQ

Can someone help me with this and can someone help with the HeapSort for this Java program?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started