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

 

amjadm@miamioh.edu > rightShift
prev  |  next  |  chance

Given a string of digits, right shift the digits n times. For instance: if str="11234321", and n = 2, the result should be "00112343". We can assume n is always within the range.


rightShift("111", 1) → "011"
rightShift("1", 1) → "0"
rightShift("100", 1) → "010"

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

public String rightShift(String str, int n) { }

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

Copyright Nick Parlante 2017 - privacy