Rotate Array
Given an array, rotate the array to the right byk_steps, where _k is non-negative.
Example
Example 1:
Example 2:
Note
三步翻转法
abcd | efg => 两段分别反序
dcba | gfe => 整体反序
efgabcd
Code
Last updated
Given an array, rotate the array to the right byk_steps, where _k is non-negative.
Example 1:
Example 2:
三步翻转法
abcd | efg => 两段分别反序
dcba | gfe => 整体反序
efgabcd
Last updated