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

 

norm.krumpe@muohio.edu program11 > repeat
prev  |  next  |  chance

Given an array and a non-negative integer n, return an array consisting of n copies of the original array.


repeat([3, 4], 2) → [3, 4, 3, 4]
repeat([10, 20, 30], 3) → [10, 20, 30, 10, 20, 30, 10, 20, 30]
repeat([1], 5) → [1, 1, 1, 1, 1]

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

int[] repeat(int[] nums, int n) { }

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: 200

Copyright Nick Parlante 2017 - privacy