about | help | code help+videos | done | prefs |
Given an array of ints called nums, create and return a new array that has everything in nums in the same order, after newStart as the new first value (index 0). (The length of the output array will be one larger than the length of the input array) apcsaArraysAddToStart([0, 1, 2], 3) → [3, 0, 1, 2] apcsaArraysAddToStart([4, 9, 1, 3], 0) → [0, 4, 9, 1, 3] apcsaArraysAddToStart([-1], 1) → [1, -1] ...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: 220
Copyright Nick Parlante 2017 - privacy