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

 

simona1@sfusd.edu > combine3plus3
prev  |  next  |  chance

Given two arrays nums1 and nums2 return a new array containing the first 3 elements of each array. The first 3 elements of nums1 should be in the first part of the new array and the first 3 elements of nums2 should be in the second part. Both nums1 and nums2 will have a length of 3 or greater.


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

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

public int[] combine3plus3(int[] nums1, int[] nums2) { }

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