about | help | code help+videos | done | prefs |
Given an array of non-negative integers, return a new array where each element of the original is repeated the appropriate number of times (as the number itself indicates). nestedLoopsArray([1, 2, 3]) → [1, 2, 2, 3, 3, 3] nestedLoopsArray([4]) → [4, 4, 4, 4] nestedLoopsArray([0, 0]) → [] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 210
Copyright Nick Parlante 2017 - privacy