Arrays

Rotate Array

medium
Given an integer array `nums`, rotate the array to the right by `k` steps. Return the rotated array (in-place mutation is fine).
Hint steps(0/2 revealed)
  1. 1

    Complete previous step or reveal to unlock this hint.

  2. 2

    Complete previous step or reveal to unlock this hint.