about | help | code help+videos | done | prefs |
apcsaArraysSwapMirrorElements
Swap the mirror elements of a given array. Thus, the first and last elements are swapped, the second and second-to-last elements are swapped and so forth. Return the modified array. HINTNote that this basically reverses the array. Most people get this problem wrong not by messing up the swaps, but by not thinking through the loop. apcsaArraysSwapMirrorElements([3, 4]) → [4, 3] apcsaArraysSwapMirrorElements([5, 8]) → [8, 5] apcsaArraysSwapMirrorElements([1, 2, 3, 4, 5]) → [5, 4, 3, 2, 1] ...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: 250
Copyright Nick Parlante 2017 - privacy