Finished algorithms exercises for arrays.rb and update arrays_spec.rb