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

 

array_merge


Given two integer arrays "a" and "b" that are already sorted from least to greatest, create a new integer array named "c" that contains the contents of both arrays merged together in one while still being sorted from least to greatest.


array_merge([1, 3], [2, 4]) → [1, 2, 3, 4]
array_merge([2, 4, 6], [1, 3, 5]) → [1, 2, 3, 4, 5, 6]
array_merge([1, 3, 5, 7], [2, 4, 6, 8]) → [1, 2, 3, 4, 5, 6, 7, 8]

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

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

Post-solution available

Copyright Nick Parlante 2017 - privacy