implemented merge sort in erlang, c and ruby