```
class Solution {
public:
void rotate(int nums[], int n, int k) {
int solution[n];
for(int i = 0; i < n; i++){
if(i < k){
solution[i] = nums[i + (n - k)];
} else {
solution[i] = nums[i - k];
}
}
}
};
```

I tested this solution on the test case the leetcode is saying I'm getting wrong, and it is getting it right. This is consistent with my very slow and methodical read through of the logic, which appears to be correct.