Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left Rotate the Array by One #329

Open
SiddhiShivale opened this issue Oct 30, 2024 · 0 comments
Open

Left Rotate the Array by One #329

SiddhiShivale opened this issue Oct 30, 2024 · 0 comments

Comments

@SiddhiShivale
Copy link

Problem explanation:

Example 1:
Input:
N = 5, array[] = {1,2,3,4,5}
Output:
2,3,4,5,1
Explanation:

Since all the elements in array will be shifted
toward left by one so ‘2’ will now become the
first index and and ‘1’ which was present at
first index will be shifted at last.

Example 2:
Input:
N = 1, array[] = {3}
Output:
3
Explanation:
Here only element is present and so
the element at first index will be shifted to
last index which is also by the way the first index.

Hey @Evgenii-Bazhaov I want to contribute in hacktoberfest2024. If you find this DSA problem useful please add a tag to it and and assign me the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants