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

 

jebbert@volusia.k12.fl.us > sept7_2018_HL_interlace
prev  |  next  |  chance

Write a method that combines two already sorted arrays of integers into one big array of sorted integers. There are many different ways to do this, but one particular way is significantly easier. I highly recommend exploring ON PAPER first! Look at the test data!


sept7_2018_HL_interlace([1, 5, 6, 12, 43, 53, 66, 77, 78, 79, 200, 320], [20, 43, 54, 55, 77, 120, 150, 200]) → [1, 5, 6, 12, 20, 43, 43, 53, 54, 55, 66, 77, 77, 78, 79, 120, 150, 200, 200, 320]
sept7_2018_HL_interlace([5, 12, 20], [18, 19, 23]) → [5, 12, 18, 19, 20, 23]
sept7_2018_HL_interlace([4, 6, 12, 16, 22, 23, 27], [5, 7, 8, 9, 15, 17, 18, 22, 30, 33, 35]) → [4, 5, 6, 7, 8, 9, 12, 15, 16, 17, 18, 22, 22, 23, 27, 30, 33, 35]

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

public int[] sept7_2018_HL_interlace(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: 290

Copyright Nick Parlante 2017 - privacy