C# Solution
Runtime: 256 ms, faster than 93.03% of C# online submissions for Rotate Array.\nMemory Usage: 30.6 MB, less than 10.00% of C# online submissions for Rotate Arra
Runtime: 256 ms, faster than 93.03% of C# online submissions for Rotate Array.\nMemory Usage: 30.6 MB, less than 10.00% of C# online submissions for Rotate Array.\n\n```\npublic class Solution {\n    public void Rotate(int[] nums, int k) {       \n        // Solution 1 -- Time: O(n), Space: O(n)\n        int[] output = new int[nums.Length];\n        int length = nums.Length;\n        for(int i=0; i<nums.Length; i++) {\n            output[(i+k) % length] = nums[i];\n        }\n        for(int i=0; i<nums.Length; i++) {\n            nums[i] = output[i];\n        }\n    }\n}\n```
['C#']