Link to home
Start Free TrialLog in
Avatar of TheBigB11
TheBigB11

asked on

Heap using 3 arrays (coursework)

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.
Avatar of taggarwal_expert
taggarwal_expert

can you please explain the problem statement a bit more? Stress mainly of function parameters, their usage. if possible explain with an example....
Avatar of Mick Barry
ASKER CERTIFIED SOLUTION
Avatar of phoffric
phoffric

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.