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

Added: Rotation of Array under 1D array #1586

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

rajdeepchakraborty-rc
Copy link
Contributor

Issue Resolved

Algorithm Added

Rotation of Array

Description

The Rotation of Array algorithm is used to shift the elements of an array to the left or right by a specified number of positions. When elements are shifted beyond the array bounds, they wrap around to the other end. This algorithm is commonly applied in circular queues, data shuffling, and simulations where cyclic movement of elements is required.

Example:

Input: arr = [1, 2, 3, 4, 5]
Let positions = 2, direction = 'R'

Output: arr = [4, 5, 1, 2, 3]

@pankaj-bind pankaj-bind merged commit 829f7bd into AlgoGenesis:main Nov 4, 2024
1 of 2 checks passed
@rajdeepchakraborty-rc rajdeepchakraborty-rc deleted the rotate branch November 4, 2024 07:30
@rajdeepchakraborty-rc
Copy link
Contributor Author

Thanks for reviewing the PR

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

Successfully merging this pull request may close these issues.

[NEW ALGORITHM] Rotation of Array under 1D array
2 participants