about | help | code help+videos | done | prefs |
Write a method that inserts an int into an array of ints at the given position. The resulting array should be returned in a new array. The given positions (p) will always be between 1 and the length of the array + 1, inclusive. insertAt([1, 2, 3], 4, 1) → [4, 1, 2, 3] insertAt([1, 2, 3], 4, 2) → [1, 4, 2, 3] insertAt([1, 2, 3], 4, 3) → [1, 2, 4, 3] ...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: 270
Copyright Nick Parlante 2017 - privacy