일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- string
- sorting
- 재귀
- recursive
- leetcode
- matrix
- 미디움
- Medium
- easy
- 문자열
- Depth-first Search
- 리트코드
- tree
- backtracking
- Python
- DP
- list
- hash table
- math
- linked list
- two pointers
- binary search
- dfs
- binary tree
- Array
- 쉬움
- 이진트리
- HashTable
- Binary
- 중간
- Today
- Total
목록Algorithm/LeetCode (135)
부부의 코딩 성장 일기
1. 문제 링크 https://leetcode.com/problems/jump-game/ 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 2. 문제 설명 정수 array인 nums가 주어졌을 때, 초기에는 nums의 첫번째 array에 위치..

1. 문제 링크 Spiral Matrix - LeetCode Spiral Matrix - LeetCode Can you solve this real interview question? Spiral Matrix - Given an m x n matrix, return all elements of the matrix in spiral order. Example 1: [https://assets.leetcode.com/uploads/2020/11/13/spiral1.jpg] Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Outpu leetcode.com 2. 문제 설명 m×n 행렬이 주어졌을 때, 왼쪽 위에서 시작해서 회오리 돌며 진행하며 수를 리스트에 넣어 반환 예시) matri..
1. 문제 링크 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 2. 문제 설명 정수로 구성된 array가 주어졌을 때, element의 합이 가장..
1. 문제 링크 Pow(x, n) - LeetCode - LeetCode Can you solve this real interview question? - Implement pow(x, n) [http://www.cplusplus.com/reference/valarray/pow/], which calculates x raised to the power n (i.e., xn). Example 1: Input: x = 2.00000, n = 10 Output: 1024.00000 Example 2: Input: x = 2.1 leetcode.com 2. 문제 설명 x와 n이 주어지면 x의 n제곱을 반환하기 3. 처음 풀이 그냥 x**n 하면 되는데 그게 출제 의도는 아닌 것 같다. x가 0이나 1이면 그대로..
1. 문제 링크 https://leetcode.com/problems/group-anagrams/ 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 2. 문제 설명 문자열로 구성된 array strs가 주어졌을 때, anagrams로..

1. 문제 링크 Rotate Image - LeetCode 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 2. 문제 설명 주어진 행렬을 시계방향으로 90도 회전하는 것 그런데 제자리 알고리즘(in-place)으로 해결해야한다. 새로운..
1. 문제 링크 https://leetcode.com/problems/permutations-ii Permutations II - LeetCode Can you solve this real interview question? Permutations II - Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order. Example 1: Input: nums = [1,1,2] Output: [[1,1,2], [1,2,1], [2,1,1]] leetcode.com 2. 문제 설명 이전 46. Permutations와 유사하게, nums라는 array가 ..
1. 문제 링크 Permutations - LeetCode 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 2. 문제 설명 [1,2,3] 이 주어지면 이 수들로 가능한 모둔 순열(중복X, 순서 구분O)을 반환하는 문제 예시) [1,2,3]이..