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

Java > Array-2 > shiftLeft
prev  |  next  |  chance

Return an array that is "left shifted" by one -- so {6, 2, 5, 3} returns {2, 5, 3, 6}. You may modify and return the given array, or return a new array.

shiftLeft({6, 2, 5, 3}) → {2, 5, 3, 6}
shiftLeft({1, 2}) → {2, 1}
shiftLeft({1}) → {1}

...Save, Compile, Run

See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops


prev  |  next  |  chance   |  CodingBat  >  Array-2

Forget It! -- delete my code for this problem

New just for fun
 Random User Progress Graphs
 Random Epic Graphs 266.0

Copyright Nick Parlante 2006-11 - privacy