Extensible Sorting

You may have encountered this situation before: You have a collection of objects that need sorting, but you want to be able to sort the objects differently depending upon which value or values you use to sort them. In

The Collatz Conjecture

The Collatz conjecture is an interesting "open" math problem regarding sequence generation. First proposed in 1937, the conjecture states that if you start with any positive integer(n), and if its

Visualizing Trees

If you've ever implemented a tree based data structure, chances are when it came time to display the tree, you were left scratching your head. Sure, different tree traversal algorithms allow us to print the contents in

Algorithmic Problems

The practice of generalizing issues in algorithmic design as "problems" predates the invention of computers. One such example is "The hamiltonian circuits problem" in graph theory which is a generalization of the "tr

A (very) brief introduction to using the template keyword for implementing generic functions in C++11 (and up!)

Generics

The situation often arises where we need a function that works with an array, but the situation arises w