You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: