Problem Analysis Solution 123456789 class : def rotate(self, nums, k): """ :type nums: List[int] :type k: int :rtype: void Do not return anything, modify nums in-place instead. """ k = k % len(nums) nums[:] = nums[-k:] + nums[:-k] Link 189. Rotate Array 赞微海报分享
近期评论