Written Algorithms in Ruby and Java