about | help | code help+videos | done | prefs |
swapList
Swaps the elements at index1 and index2 of ArrayList a, then returns the array. Precondition: a will have a size of 2 or greater. swapList([1, 3, 5, 7], 0, 3) → [7, 3, 5, 1] swapList([1, 3, 99], 0, 1) → [3, 1, 99] swapList([1, 3, 99], 1, 2) → [1, 99, 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
Copyright Nick Parlante 2017 - privacy