-
Notifications
You must be signed in to change notification settings - Fork 250
[Question] Rotate array Left K times and Right K times. #243
Comments
Can you assign it to me for Java? |
Can you assign it to me for C++? |
Are you sure that's the expected output in that case? To me it looks like it would remain the same in that case, since k equals the length of the array. Input: Output: I will do this in Python. |
Yes , there was a typo mistake , the output was for K=4 , have updated , many thanks ! |
Can you assign to me in C#? |
Added PR #257 to solve this in Python. |
Please check PR: #251 for Java Solution |
@aditya109 Dont we have to have to work on PRs after you assign us the issue ? |
Hi @pranatimittal @prinsusinghal @Ajordat @hrj-star @cyenney ! Great work on your PR ! If you have not please consider starring this repo to encourage further contributions. |
Hi @hrj-star ! No it is not really compulsory. Please raise a PR whenever you see fit. |
Thank you @aditya109. Will you please Merge the PR(#263 ) or add hacktoberfest-accepted lable? It will then be counted as one of my PR |
Yes @aditya109 do the same with my PR also |
Problem : Given an array , return its left rotated and right rotated array by K positions.
Sample Input : arr [] =1 2 3 4 5 , K = 5
Output :
Left Rotated array by K=5 times : 1 2 3 4 5
Right Rotated array by K =5 times : 1 2 3 4 5
Sample Input : arr [] =1 2 3 4 5 , K = 4
Left Rotated array by K=4 times : 5 1 2 3 4
Right Rotated array by K =4 times : 2 3 4 5 1
Will implement in Java.
The text was updated successfully, but these errors were encountered: