Skip to content

Commit

Permalink
1470
Browse files Browse the repository at this point in the history
  • Loading branch information
isinsuarici committed Jan 16, 2022
1 parent 19596a4 commit 155c1a0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions E_1470_ShuffleTheArray.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
public class Solution {
public int[] shuffle(int[] nums, int n) {
int[] sonuc = new int[nums.length];
int i=0;
for(int j=0;j<n; j++) {
sonuc[i] = nums[j+0];
sonuc[i + 1] = nums[j+n];
i=i+2;
}
return sonuc;
}
}

0 comments on commit 155c1a0

Please sign in to comment.