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

 

frew@mclean.com apcs2025unit4aalgs > shiftRight
prev  |  next  |  chance

Given an array of integers, return the result of shifting each value one position to the right (wrapping around). You may allocate a new array or return the same one.


shiftRight([]) → []
shiftRight([1]) → [1]
shiftRight([1, 2, 3]) → [3, 1, 2]

...Save, Compile, Run (ctrl-enter)

int[] shiftRight(int[] vals) { }

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: 266

Copyright Nick Parlante 2017 - privacy