leetle

Daily challenge for 2025-02-25

56. Rotate Array (Cyclic)

Write a function solve that rotates an array to the right by k steps. Ideally, you should be able to rotate the array in-place, but be sure to still return your solution.

Example:
Input: [1,2,3,4,5,6,7], 3
Output: [5,6,7,1,2,3,4]

Run this challenge interactively in Python or JavaScript when the app loads.