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

 

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

You are running an office which, for some reason, needs an array that is made up of multiple-copies of another array. Your method accepts an array of integers of any length. It also accepts a non-negative integer telling how many copies you want. Return one array containing that number of copies of the original array. Look at the test data for examples.


makeCopiesOffice([17, -4], 1) → [17, -4]
makeCopiesOffice([3, 5, -1, 8], 2) → [3, 5, -1, 8, 3, 5, -1, 8]
makeCopiesOffice([2], 5) → [2, 2, 2, 2, 2]

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

public int[] makeCopiesOffice(int[] nums, int count) { }

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