Given an array of integers nums and a whole number k, rotate the array to the right by k positions and return the result.
k may be larger than the array; rotating by nums.length is a no-op.
Rotate an Array Right (Set 1) — the data. This set runs 4 cases: nums holds arrays of 2–10 items, with values from -20 to 17; k ranges over 0–9. The hidden cases are the largest of the set.