https://leetcode.cn/problems/rotate-array/description/?envType=study-plan-v2&envId=top-interview-150
class Solution {
public:
void rotate(vector<int>& nums, int k) {
k = k % nums.size(); // 注意k要取一下模
reverse(nums.begin(), nums.end()-k);
reverse(nums.end()-k, nums.end());
reverse(nums.begin(), nums.end());
}
};