We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Heap using 3 arrays (coursework)

TheBigB11
TheBigB11 asked
on
Medium Priority
346 Views
Last Modified: 2013-11-13
I am new to programming and my teacher wants us to implement a priority queue using heap with 3 arrays. instance variables (data[], priority[],entered[]). How would I go about doing this? I only need an add and remove method.
Comment
Watch Question

can you please explain the problem statement a bit more? Stress mainly of function parameters, their usage. if possible explain with an example....
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT

Commented:
Author asks for a very specific design of a priority queue:
heap
3 arrays named data[], priority[], and entered[]
In http:#35464813 are definitions and relationships of these three arrays. Also, since the heap is to be implemented as an array, this post also provides the parent/child index relationships for the heap. The add and remove operations for the Priority Queue are explained in a provided link.
Dirk HaestProject manager
CERTIFIED EXPERT

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.