Quicksort

While the Quicksort is relatively fast, O(nlog(n)) in terms of speed on average, a lot of programmers fear it because they don’t like, understand, or maybe even know about recursion.  Recursion is the process of a function calling itself. There is usually a slight penalty for recursion as each function call is slower than if…

Bubble Sort

The bubble sort is one of the simplest sorts you can write, from a developer’s perspective. Unfortunately, it is one of the slowest to run from the computer’s perspective. A Bubble Sort works on the following idea. Given a list of values, start at the top value, and look at the next value. If the…

C++ Math

C++ gives you a lot of ways to do math, built into the language directly. Unfortunately, it can get complex – so we’re going to focus on the simple stuff. The order of operation in C++ is the same as in algebra, so that is easy to remember. + is addition – is subtraction *…