about | help | code help+videos | done | prefs |
Write a method that returns a reversed copy of the array 'nums' which is passed in as an input parameter. But that is too easy!!! To make it more difficult, you are not allowed to use any other arrays! So you must reverse the 'nums' array without making a new array! I know I have told you that it is bad practice to modify input parameters, but you will have to do that this time in order to meet the requirements. The input parameter 'nums' can contain any number of integer elements, and each element can be any integer. The 'nums' array can even be an empty array. So be careful! See the test data for more information. sept28_2018_SLHL_reverseContents([50, 160, 3592]) → [3592, 160, 50] sept28_2018_SLHL_reverseContents([5, 142, 6, 90]) → [90, 6, 142, 5] sept28_2018_SLHL_reverseContents([]) → [] ...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: 290
Copyright Nick Parlante 2017 - privacy