Posting the heap code

I started a series of articles about heaps a few months back, but then got sidetracked with other projects and didn’t complete my article series. All that was lacking was the code and some detailed explanation of some parts, but I’d already covered the important theoretical stuff.

I probably won’t finish those articles any time soon, but the code is complete and usable. The download file, HeapCode, is a .zip file that contains the IHeap interface and the DHeap class. Using them is straightforward. If you’re at all familiar with .NET generic collections and you’ve looked over my heap articles, you’ll be able to use the DHeap class without trouble.

For reference, the articles in the series are:

Priority queues
A better way to do it: the heap
A simple heap of integers
Uses for heaps
The d-ary heap
Heaps: cleaning up some code
The IHeap interface
Heaps: constructors for the DHeap class

Happy heaping.