about | help | code help+videos | done | prefs |
Given an ArrayList of Integers of unknown size and three other int values, remove the three elements of the ArrayList located at the index positions specified by the int values. Set the first element of the ArrayList to be the average of the three removed values (rounded to the nearest int), and return the ArrayList. Preconditions: the ArrayList will have at least four elements, and the other int values will be in decreasing order to prevent confusion about which indexes they represent.apcsaListAverageRemovals([3, 6, 8, 10], 3, 2, 1) → [8] apcsaListAverageRemovals([-177, 383, 476, -15, 62, 19, -247], 3, 2, 1) → [281, 62, 19, -247] apcsaListAverageRemovals([258, 99, 225, 430, -497, 124], 4, 3, 3) → [19, 99, 225] ...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: 230
Copyright Nick Parlante 2017 - privacy