Posts tagged with 'priority-queue'

PCPlus 271: Binary heaps

I write a monthly column for PCPlus, a computer news-views-n-reviews magazine in the UK (actually there are 13 issues a year — there's an Xmas issue as well — so it's a bit more than monthly). The column is called Theory Workshop and appears in the back of every issue. When I signed up, my editor and the magazine were gracious enough to allow me to reprint the articles here after say a year or so. After all, the PDFs do appear on each issue's DVD after a few months. When I buy the current issue, I'll publish the article from the issue a year ago. Since I've now got August's issue (and have had it for a couple of weeks), here's August 2008's article.

PCPlus logo This time, the topic is one of my favest data structures ever: the binary heap, the structure of choice for priority queues everywhere. A great data structure with some absolutely awesome algorithms invented by one of the most brilliant computer scientists, Robert W. Floyd. Enough superlatives for you?

Really, I kid you not. I love this data structure. I can write about and implement it at the drop of a hat; no need for extra research (so I imagine I was getting close to the deadline for this article and needed to write something quickly). Weirdly, people ask me more about harder data structures — red-black trees as a notorious example — and not about this simple, fine data structure. An implementation of this (and a hash table) was the main reason people downloaded (and continue to download) my data structures library for Delphi, EZDSL.

This article first appeared in issue 271, August 2008.

You can download the PDF here.

Now playing:
Crowded House - Don't Dream It's Over
(from Recurring Dream, Best Of Crowded House)

 

Extras

Search

About Me

I'm Julian M Bucknall, the M because it's my middle initial and because I and the other Julian Bucknall (the movie guy) would like to differentiate ourselves.

I'm a programmer by trade, an actor by ambition, and an algorithms guy by osmosis. I write articles for PCPlus in my spare time, not that there's much of that.

Julian M Bucknall Apart from that, an ex-pat Brit, atheist, microbrew enthusiast, Pet Shop Boys fanboy, slide rule and HP calculator collector, amateur photographer, Altoids muncher.

DevExpress

I'm Chief Technology Officer at Developer Express, a software company that writes some great controls and tools for .NET and Delphi. I'm responsible for the technology oversight and vision of the company.

Validation

Validate markup as HTML5 (beta)     Validate CSS

Bottom swirl

Archives

May 2012 (4)
SMTWTFS
« Apr  
12345
6789101112
13141516171819
20212223242526
2728293031

Like this Archive Calendar widget? Download it here.

Social networking

The OUT Campaign

The OUT Campaign

My Tweets

  • Honest Movie Trailer of Phantom Menace http://t.co/sif8y4Ns and then Battleship, er, Transformers http://t.co/sif8y4Ns
  • Damn, Donna Summer and Chuck Brown both gone in the last 24 hours. Different types of music, sure, but enjoyed them both. :(
  • Just saw a company page showing a list of tweets with "Join the conversation" linked to their Twitter a/c. The tweets are 6 months old #fail
Bottom swirl