@@ -0,0 +1,631 @@
+//Rotate an array of n elements to the right by k steps.%0Apublic class Solution %7B%0A    public void rotate(int%5B%5D nums, int k) %7B%0A        if(nums == null %7C%7C nums.length == 0) return;%0A        k = k %25 nums.length;%0A        if(k == 0) return;%0A        %0A        inverse(nums, 0, nums.length-k-1);%0A        inverse(nums, nums.length-k, nums.length-1);%0A        inverse(nums, 0, nums.length-1);%0A    %7D%0A    %0A    private void inverse(int%5B%5D nums, int left, int right) %7B%0A        while(left %3C right) %7B%0A            int tmp = nums%5Bleft%5D;%0A            nums%5Bleft%5D = nums%5Bright%5D;%0A            nums%5Bright%5D = tmp;%0A            left++; right--;%0A        %7D%0A    %7D%0A%7D%0A

Create 189.java