Code credit: rosettacode.org. A sandbox to help study these algorithms more closely.