Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Programming Logic - D Heaps

ChocolteloveChocoltelove Posts: 1Member
I am writting a code that should do the following for a d-heap:
1. deleteMin( and percolate down)
2. insert
3. buildHeap

I have code that was given to us and is similar to this code:
http://www.java-tips.org/java-se-tips/java.lang/priority-queue-binary-heap-implementation-in-3.html

I know how to do a d-heap by hand and how it works, but when it comes to putting it in code I over think the problem and I get stuck. What is the relationship between the parent and child nodes and how would this change the code to take an inputed value of d from the user? Thanks for the help.
Sign In or Register to comment.