A bunch of algorithms implemented in ruby