about | help | code help+videos | done | prefs |
insert
Given an array of ints, int index, and int newValue, insert the newValue at the given index and return a new array. You can always assume the given index is a valid index in the range. insert([], 0, 111) → [111] insert([1, 1, 1], 1, 0) → [1, 0, 1, 1] insert([-1, 2, -4, 8], 4, 50) → [-1, 2, -4, 8, 50] ...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