[LeetCode] 189. Rotate Array
·
코딩테스트/Python
🔗 Problem Link Rotate Array - LeetCode Can you solve this real interview question? Rotate Array - Given an integer array nums, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: nums = [1,2,3,4,5,6,7], k = 3 Output: [5,6,7,1,2,3,4] Explanation: rotate 1 step leetcode.com ❔Thinking 주어진 배열 자체를 변환해야 하고, 다른 배열을 선언하지 말아야 한다. 💻Solution def rotate(self, nums: List[int]..