Threshold should be a compile time constant even with -O0
Add include guards.
Algorithms should include their own utilities.
Make the algorithm for the test case a command line parameter