Closed PulkitPansari13 closed 3 years ago
Hi @pratik-choudhari , I would like to do this code in Java . Could you please assign me for the same ?
I would like to do this code in C. May I?
Hi @pratik-choudhari , I would like to do this code in Java . Could you please assign me for the same ?
I have added the implementation for the required problem in Java and made a pull request . If any more changes are to be made , please do let me know .Thank you !
Hey, I would like to contribute in C/C++ language. Can you assign it to me
hi, can i contribute with this? i would use python
@KompuDan You are assigned to 2 issues, it's the max limit for this repo.
@pratik-choudhari can you assign this to me? I can code in python3
Feature ✅
Description
Given an array A with n integers return True if it is possible to sort the array in increasing order by swapping the i-th element A[i] with the (i+k)-th element A[i+k] else return False. You may perform the operation any number of times.
Input format
n k A1 A2 A3 ......An
Example
input : 6 1 2 4 1 3 5 8 output: True
input: 6 2 4 2 7 1 3 6 output: False
input: 4 2 4 7 1 3 output: True
In sample 1, we can always swap adjacent elements and we will get sorted array In sample 2, no swapping will lead to a sorted array In sample 3, we can swap 1st and 3rd element as well as 2nd and 4th element
Checklist:
Contributors are supposed to mention their coding language while asking for assignment