Simple || Beats 100%😉
\n\nclass Solution {\n    public void rotate(int[] nums, int k) {\n        k %= nums.length;\n        int n = nums.length;\n        reverseNum(nums,0,n-1);\n   
\n```\nclass Solution {\n    public void rotate(int[] nums, int k) {\n        k %= nums.length;\n        int n = nums.length;\n        reverseNum(nums,0,n-1);\n        reverseNum(nums,0,k-1);\n        reverseNum(nums,k,n-1);\n    }\n    public void reverseNum(int[] nums, int start, int end) {\n        while(start < end) {\n            int temp = nums[start];\n            nums[start] = nums[end];\n            nums[end] = temp;\n            start++;\n            end--;\n        }\n    }\n}\n```\n![1271c6fe-345b-4f3d-959e-d13e791111d7_1677726484.8832572.jpeg](https://assets.leetcode.com/users/images/b5d72c1f-750f-4f09-a85a-b14f1ac49274_1693936505.706019.jpeg)\n
['Java']