about | help | code help+videos | done | prefs |
Given an ArrayList of Integers called lst, add a new element at position pos, with the same value as the old element at pos. Thus, if pos is 0 and the element at index 0 has the value 3, your code would insert an additional Integer element with the value 3 such that the first two elements both now have the value 3. Return the ArrayList as output. apcsaListAddRepeat([3, 4, 5], 2) → [3, 4, 5, 5] apcsaListAddRepeat([5, 0, 3], 0) → [5, 5, 0, 3] apcsaListAddRepeat([3, 5, 6], 1) → [3, 5, 5, 6] ...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