Added elementary algorithms in Ruby