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
countDown
Objective(s): Practice traversing arrays and working with loops to generate values.
Given an array, nums
, fill it with numbers starting at length-1
to 0
. See examples below
countDown({0,0,0})->{2,1,0} //Example for a length 3 array
countDown({0,0,0,0,0})->{4,3,2,1,0} //example for a length 5 array
countDown({0})->0 //example for a length 1 array