// Rotate Array — MEDIUM
// Category: array
Given an integer array `nums`, rotate the array to the right by `k` steps, where `k` is non-negative.
**In-place O(1) extra space trick:** Reverse the whole array, then reverse the first `k` elements, then reverse the rest.
**Follow-up:** Try to come up with as many solutions as you can.
Example: nums = [1,2,3,4,5,6,7], k = 3
Output: [5,6,7,1,2,3,4]