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

 

simona1@sfusd.edu sorting > mergeList
prev  |  next  |  chance

Merges two sorted ArrayLists of Integers into one sorted ArraList of Integers. There may be duplicates in the returned array.


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

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

public ArrayList<Integer> mergeList(ArrayList<Integer> a, ArrayList<Integer> 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: 375 Post-solution available

Copyright Nick Parlante 2017 - privacy