Advance the Shift Rotation
Intermediate SolvedA duty roster rotates one position each day: whoever was first moves to the back of the queue. Given today’s order, produce tomorrow’s.
Implement `solve(List<String> items)` (non-empty) to return the list rotated left by one (first element moves to the end).
Examples
Input
["a", "b", "c", "d"]Output
["b", "c", "d", "a"]Input
["x"]Output
["x"]Hints
- Add everything from index 1 onward, then add index 0 last.
Tests
Your code runs in a secure sandbox against multiple hidden test cases. The problem is solved only when every test passes. Each run is isolated and any data changes are rolled back automatically.