Skip to content

Instantly share code, notes, and snippets.

@johntran
Created December 17, 2017 01:27
Show Gist options
  • Save johntran/021de1e7c2d521ff1c3aecd16b12622d to your computer and use it in GitHub Desktop.
Save johntran/021de1e7c2d521ff1c3aecd16b12622d to your computer and use it in GitHub Desktop.
/**
Given two sorted arrays, merge them into one big sorted array
Ex:
merge([1,3,5],[2,4,6])
returns [1,2,3,4,5,6]
You cannot use array.sort().
Try to solve this in O(n+m) runtime.
Where n is the length of the first array
and m is the length of the second array.
*/
function merge(arr1, arr2){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment