id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > sept28_2018_SLHL_reverseContents
prev  |  next  |  chance

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)

public int[] sept28_2018_SLHL_reverseContents(int[] nums) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 290

Copyright Nick Parlante 2017 - privacy