Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork439
added 189#165
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
added 189#165
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
I can tell this is your first pull request! Thank you I'm so honored. 🎉🎉🎉 I'll take a look at it ASAP! |
Member
GouravRusiya30 commentedMay 17, 2021
HI@ShambhaviSharma0110 |
ContributorAuthor
ShambhaviSharma0110 commentedMay 17, 2021
is it okay now? |
Member
GouravRusiya30 commentedMay 17, 2021
Looks good to me !!! |
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Uh oh!
There was an error while loading.Please reload this page.
Pull Request Template
Description
Please include a summary of the problem and about the approach to solve the solution. Please also include relevant motivation and context.
List any dependencies that are required for this change.
We basically have to rotate an array in a cyclic manner and the rotation has to be for a subarray of k size of elements.
I have used the approach of reversing to solve the problem, we'll reverse the array thrice to get the solution, time complexity =O(n) and space is O(1)
Put check marks:
Have you made changes inREADME file ?
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
nums = [1,2,3,4,5,6,7], k = 3
Output: [5,6,7,1,2,3,4]
nums = [-1,-100,3,99], k = 2
Make sure all below guidelines are followed else PR will get Reject: