WaymoSoftware Engineer · OnsiteCodemia practiceOptimize rotation for O(1) space
Given an array representing a list of elements, implement a function to rotate the array to the right by a given number of steps, ensuring that the solution uses O(1) space. The function should modify the array in place and return nothing, with the input being the array and the number of steps as an integer.
Medium
Coding & Algorithms