Quicksort in C

Introduction Quicksort is one of the most common sorting algorithms and one of the most efficient. It's so common that it's part of C89. That said, it's still good to know how it works, its strengths, and it's weaknesses. It takes as a divide and conquer approach to sorting. An element is selected as a … Continue reading Quicksort in C

Byte Swapping in C

Introduction Some times you need to swap bytes. Sometimes you don't. But right now we do. Well, we don't but if we were implementing some sorting functions we'd need a good swap function. Sorting typically doesn't move pointers around, instead it moves the bytes pointed to by the pointer. Generic Swap We only want to … Continue reading Byte Swapping in C