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

 

crehwinkel@frhsd.com post-exam-problems > rightShiftOne
prev  |  next  |  chance

Write a method that right shifts an array passed to the method by 1. So passing and array of {6, 2, 5, 3} returns the array {3, 6, 2, 5}.


rightShiftOne([6, 2, 5, 3]) → [3, 6, 2, 5]
rightShiftOne([1, 2, 3, 4, 5, 6]) → [6, 1, 2, 3, 4, 5]
rightShiftOne([-3, -2, 0]) → [0, -3, -2]

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

public int [] rightShiftOne(int [] arr){ }

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

Copyright Nick Parlante 2017 - privacy