...

/

Solution Review: Right Rotate List

Solution Review: Right Rotate List

Let’s solve the Rotate List problem.

Statement

Given a list, nums, and an integer, k, rotate the list to the right by k positions so that each rotation involves shifting the elements one position at a time.

Constraints:

  • 11 \leq nums.length 103\leq10^3

  • 105-10^5\leq ...