Tag Archives: algorithms

Conditional in-place merge algorithm

Say you have a sorted sequence of objects. Go ahead, say: “I have a sorted sequence of objects!” Now say it’s fairly cheap to copy those objects, you need to be space-efficient and your sequence may have partial duplicates — … Continue reading

Posted in C & C++ | Tagged | Comments Off on Conditional in-place merge algorithm

Radix Sort

The Radix Sort algorithm is a stable sorting algorithm that allows you to sort a series of numerical values in linear time. What amazed me, however, is that it is also a natural approach to sorting: this is a picture … Continue reading

Posted in Interesting stuff | Tagged , | Comments Off on Radix Sort

The heap algorithm

Last night, I had an idea for a new lock-free algorithm: a single-producer, single-producer queue with a wait-free push and a lock-free pop. The algorithm in question, which is remarkably efficient for, e.g., logging (which is why I called the … Continue reading

Posted in C++ for the self-taught, Software | Tagged | Comments Off on The heap algorithm