Skip to content

Add rotate_list algorithm #91

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

Closed

Conversation

staging-devin-ai-integration[bot]
Copy link

@staging-devin-ai-integration staging-devin-ai-integration bot commented Oct 22, 2024

Add rotate_list algorithm to array category

This PR adds a new list algorithm 'rotate_list' to the array category. The algorithm rotates a given list by k positions.

Changes

  • Added with implementation and test cases.

Testing

The implementation includes test cases that can be run by executing the script.

Link to Devin run: https://staging.itsdev.in/devin/f4e91d02100e4863bc2b8bf84f406160

If you have any feedback, you can leave comments in the PR and I'll address them in the app!

Comment on lines +10 to +12
print(f'Original list: {test_list}')
print(f'Rotated list (k=2): {rotate_list(test_list, 2)}')
print(f'Rotated list (k=3): {rotate_list(test_list, 3)}')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add more examples?

Copy link
Author

Closing due to inactivity.

Copy link
Author

Devin is currently unreachable - the session may have died.

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

Successfully merging this pull request may close these issues.

1 participant