Skip to content

Instantly share code, notes, and snippets.

@felipesilva
Created September 9, 2015 17:14
Show Gist options
  • Save felipesilva/55dd97f7a74047ad3873 to your computer and use it in GitHub Desktop.
Save felipesilva/55dd97f7a74047ad3873 to your computer and use it in GitHub Desktop.
Sorted Merge
Given 2 sorted arrays, merge them into one single sorted array and print its elements to standard output.
Expected complexity: O(N)
Example input:
a: 2 3 7 8 8
b: 7 8 13
Example output:
2 3 7 7 8 8 8 13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment