id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

merge


Define a function that when passed two arrays, each sorted in ascending order, returns an array that merges the two arrays in an overall ascending order.

Treat a null array as an empty array.


merge([10, 70, 90], [20]) → [10, 20, 70, 90]
merge([], [1, 2, 3, 4, 5, 6]) → [1, 2, 3, 4, 5, 6]
merge([1, 2, 3, 4, 5, 6, 7, 8], []) → [1, 2, 3, 4, 5, 6, 7, 8]

...Save, Compile, Run (ctrl-enter)

int[] merge(int[] a, int[] b) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 4 Post-solution available

Copyright Nick Parlante 2017 - privacy