Students, please be sure to log in. This site does not use cookies and does not track/store work submitted when not signed in.
Unit 6 Problems
Java Reference Sheet
reverse
Objective(s): Practice traversing an array and simple data processing.
Given array nums
, return a version of the array that is reversed. For this, you will create a new array of the same size and fill it with elements from nums
in the reversed order.|
How do you know this method needs to return a 1D array?
reverse({1, 2, 3}) -> {3, 2, 1}
reverse({1, 0, 7}) -> {7, 0, 1}