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

 

soweigel@smsd.org > merge2arrays
prev  |  next  |  chance

Given: Two integers arrays that are sorted little to big. Merge the two arrays into one array that is sorted little to big and return the new array.


merge2arrays([1, 3, 5, 7, 9], [2, 4, 6, 8, 10]) → [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
merge2arrays([1, 2, 3, 4, 5], [6, 7, 8, 9, 10]) → [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
merge2arrays([2, 3, 4, 8], [1, 5, 6, 7, 9]) → [1, 2, 3, 4, 5, 6, 7, 8, 9]

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

public int[] merge2arrays(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

Copyright Nick Parlante 2017 - privacy