Left Rotate by One Problem
Left Rotate by One Problem — ExecCode School DSA Practice
Solve the Left Rotate by One problem on ExecCode. Free online school DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Given an array of integers, perform a left rotation by one position. Your task is to solve Left Rotate by One. This means the first element moves to the end, and all other elements shift one position to the left.
Examples
Input 5 1 2 3 4 5; Output 2 3 4 5 1. Input 3 7 8 9; Output 8 9 7
Constraints
1 <= n <= 10^5
Practice Left Rotate by One free on ExecCode. Browse DSA problems, topic map, and placement guides.