분류 전체보기

    [LeetCode]Maximum Subarray

    https://leetcode.com/problems/maximum-subarray/ Maximum Subarray - LeetCode Can you solve this real interview question? Maximum Subarray - Given an integer array nums, find the subarray with the largest sum, and return its sum. Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: The subarray [4,-1,2,1] has t leetcode.com 문제 분석 주어진 nums 리스트에서 숫자들의 합이 최대가 되는 subarray를 구하는 문제입니다..

    [LeetCode]Group Anagrams

    https://leetcode.com/problems/group-anagrams/description/ Group Anagrams - LeetCode Can you solve this real interview question? Group Anagrams - Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase leetcode.com 문제 분석 주어진 문자열에서 동일한 anagram을 그룹화 하는 문제입니다. 처..

    [LeetCode]Rotate Image

    https://leetcode.com/problems/rotate-image/ Rotate Image - LeetCode Can you solve this real interview question? Rotate Image - You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place [https://en.wikipedia.org/wiki/In-place_algorithm], which m leetcode.com 문제 분석 주어진 이미지를 90도 시계방향으로 돌리는 경우 숫자가 어떻게 변해있는지를 구하는 문제입니다. 처..

    [LeetCode]Permutations

    https://leetcode.com/problems/permutations/ Permutations - LeetCode Can you solve this real interview question? Permutations - Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1: Input: nums = [1,2,3] Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1], leetcode.com 문제 분석 주어진 숫자로 만들 수 있는 모든 순열을 구하는 문제입니다. 처음 시도한 답안 import iterto..

    [LeetCode]Jump Game II

    https://leetcode.com/problems/jump-game-ii/description/ Jump Game II - LeetCode Can you solve this real interview question? Jump Game II - You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums[0]. Each element nums[i] represents the maximum length of a forward jump from index i. In other wo leetcode.com 문제 분석 nums 리스트에는 한번에 점프할 수 있는 최대의 값이 들어 있습니다. 목적..

    [LeetCode]Combination Sum

    https://leetcode.com/problems/combination-sum/description/ Combination Sum - LeetCode Can you solve this real interview question? Combination Sum - Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target. You may return the comb leetcode.com 문제 분석 주어진 숫자를 더해서 target 값을 만들어 낼 수 있는 숫자 ..

    [LeetCode]Find First and Last Position of Element in Sorted Array

    https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/ Find First and Last Position of Element in Sorted Array - LeetCode Can you solve this real interview question? Find First and Last Position of Element in Sorted Array - Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is no..

    [LeetCode]Search in Rotated Sorted Array

    https://leetcode.com/problems/search-in-rotated-sorted-array/ Search in Rotated Sorted Array - LeetCode Can you solve this real interview question? Search in Rotated Sorted Array - There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your function, nums is possibly rotated at an unknown pivot index k (1 int: left = 0 right = len(nums)-1 while ..

    [LeetCode]Next Permutation

    https://leetcode.com/problems/next-permutation/description/ Next Permutation - LeetCode Can you solve this real interview question? Next Permutation - A permutation of an array of integers is an arrangement of its members into a sequence or linear order. * For example, for arr = [1,2,3], the following are all the permutations of arr: [1,2,3], leetcode.com 문제 분석 숫자가 주어졌을 때 다음 순열을 찾는 문제입니다. 처음 시도한..

    [LeetCode]Linked List Cycle

    https://leetcode.com/problems/linked-list-cycle/ Linked List Cycle - LeetCode Can you solve this real interview question? Linked List Cycle - Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuo leetcode.com 문제 분석 주어진 링크드 리스트에 사이클이 존재하는지 여부를 구하는 문제입니다. 처음 시도..