0189.Rotate Array
class Solution {
public:
void rotate(vector<int>& nums, int k) {
reverse(nums.begin(), nums.end());
if(k > nums.size()) k = k % nums.size();
reverse(nums.begin(), nums.begin() + k);
reverse(nums.begin() + k, nums.end());
}
};