public void rotate(int[] nums, int k) {
		k = k % nums.length;
		if (k == 0)
			return;
		ArrayList<Integer> arr = new ArrayList<Integer>();
		for (int i = nums.length - k; i < nums.length; ++i) {
			arr.add(nums[i]);
		}
		for (int i = nums.length - k - 1; i >= 0; --i) {
			nums[i + k] = nums[i];
		}
		for (int i = 0; i < arr.size(); ++i) {
			nums[i] = arr.get(i);
		}
	}