Created
October 25, 2016 01:41
-
-
Save kninami/53ae5eeb885e9c3ce84b7caa2c5af778 to your computer and use it in GitHub Desktop.
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
| class Solution { | |
| public int[] solution(int[] A, int K) { | |
| int[] B = new int[A.length]; | |
| for(int i=0; i<A.length; i++){ | |
| B[(i+K)%A.length] = A[i]; | |
| } | |
| return B; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment