It's one of the paradoxes of blogging that most every blogger (including myself) is sharing what they know right now (let's quietly ignore those who blog purely for traffic and visibility). Since everyone is learning, this can result in poor or misleading information being shared just as much as good information. Keep this in mind as you read any blog - how experienced is the writer and how well do they really know what they're talking about.

I'm just as flawed as other bloggers, so you should feel encouraged to check my ideas for yourself. Keep the date in mind as well - in our fast moving field, even good ideas can become obsolete.

Queue Testing

Saturday, December 08 2018 priority-queues csharp

It’s vital that our priority queue returns items in the correct order, so we should write some unit tests to ensure that items are returned in the order desired. Fortunately, we can test this fairly easy using property tests.

Read more »

Creating Branching Nodes

Saturday, December 01 2018 priority-queues csharp

For a queue exceeding two items, our existing implementations are insufficient. We need another - a BranchingImmutablePriorityQueue<T>. Each of these nodes will combine two existing sub-queues with a head item to form a tree structure.

Read more »

Two Dual Item Queues

Saturday, November 24 2018 priority-queues csharp

Once we have a priority queue containing a single item, how do we handle enqueuing the next item onto the queue? The answer, of course, is buried in the code from from last time: we introduce the DualItemImmutablePriorityQueue<T>.

Read more »

Simple Queues

Saturday, November 17 2018 priority-queues csharp

As we did with our original immutable queue, we’ll define dedicated implementations of IImmutablePriorityQueue<T> for handling empty and single item queues.

Read more »

Enqueuing Values

Saturday, November 10 2018 priority-queues csharp

After exploring last time how to remove an item from a queue, let’s look at the slightly more complex case of adding items.

Read more »

Recent posts