Skip to content

Instantly share code, notes, and snippets.

@OfTheDelmer
Created April 16, 2014 17:08
Show Gist options
  • Save OfTheDelmer/10908344 to your computer and use it in GitHub Desktop.
Save OfTheDelmer/10908344 to your computer and use it in GitHub Desktop.
warm up exercise

Warm up

Merging

In todays exercise we want to revisit the idea of merging. That is, given two sorted arrays like the following we must merge them into one sorted array.

array_1 = [5,8,9,11]
array_2 = [4,6,7,10]

merge(array_1, array_2)
# => [4,5,6,7,8,9,10,11]

Given this brief discription, implement the merge method that takes two arrays and returns the properly sorted array containing the items from each array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment