forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice > getRepeatedNumList
prev  |  next  |  chance

You are given an array of integers as an argument. Return an ArrayList that consists of n copies of any number n, in the order in which n appears.

getRepeatedNumList([0]) → []
getRepeatedNumList([1]) → [1]
getRepeatedNumList([2]) → [2, 2]

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

public List getRepeatedNumList(int[] nums) { }

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

Copyright Nick Parlante 2017 - privacy