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

 

tmhscs@gmail.com arrays > array_shiftLeftTwice
prev  |  next  |  chance

Given an integer array, shift all of the values left twice. All of the values need to be placed two indexes to the left, and the first two values in the array will wrap-around and be placed at the end of the array.


array_shiftLeftTwice([1, 2, 3]) → [3, 1, 2]
array_shiftLeftTwice([1, 2, 3, 4]) → [3, 4, 1, 2]
array_shiftLeftTwice([1, 2, 3, 4, 5]) → [3, 4, 5, 1, 2]

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

public int[] array_shiftLeftTwice(int[] data) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy