CLRS algorithms in ruby