Solving one programming question everyday in ruby.