One concise solution with constant space, O(n) time (Java)
public class Solution {\n        public void rotate(int[] nums, int k) {\n            int n = nums.length;\n            k %= n;\n            reverse(nums, 0, n)
    public class Solution {\n        public void rotate(int[] nums, int k) {\n            int n = nums.length;\n            k %= n;\n            reverse(nums, 0, n);\n            reverse(nums, 0, k);\n            reverse(nums, k, n);\n        }\n        \n        private void reverse(int[] nums, int s, int e) {\n            while (s < --e) {\n                int temp = nums[s];\n                nums[s] = nums[e];\n                nums[e] = temp;\n                ++s;\n            }\n        }\n    }\n\nAny suggestions? Thanks.
[]