Hacked-together junk as I slog through the Coursera Algs courses