[LeetCode] 55. Jump Game
·
코딩테스트/Python
🔗 Problem Link Jump Game - LeetCode Can you solve this real interview question? Jump Game - You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position. Return true if you can leetcode.com ❔Thinking 현재의 nums값은 갈 수 있는 최대 칸의 개수를 의미한다. nums의 길이가 10000까지이고, nums의 값이 100000까지 이므로, 모든 경..
[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]..