일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- hash table
- DP
- easy
- backtracking
- 문자열
- linked list
- tree
- Binary
- 중간
- 쉬움
- Medium
- 재귀
- recursive
- two pointers
- Depth-first Search
- list
- Array
- HashTable
- dfs
- sorting
- 이진트리
- leetcode
- Python
- binary search
- 리트코드
- string
- matrix
- math
- binary tree
- 미디움
- Today
- Total
목록Algorithm/LeetCode (135)
부부의 코딩 성장 일기
1. 문제 링크 https://leetcode.com/problems/reverse-linked-list-ii/ Reverse Linked List II - LeetCode Can you solve this real interview question? Reverse Linked List II - Given the head of a singly linked list and two integers left and right where left Optional[ListNode]: # 예외 처리: 노드가 없거나 하나뿐이면 원래 리스트 반환 if not head or not head.next: return head # 예외 처리: 노드가 두 개일 때 if not head.next.next: # left와 righ..
1. 문제 링크 https://leetcode.com/problems/reverse-linked-list/description/ Reverse Linked List - LeetCode Can you solve this real interview question? Reverse Linked List - Given the head of a singly linked list, reverse the list, and return the reversed list. Example 1: [https://assets.leetcode.com/uploads/2021/02/19/rev1ex1.jpg] Input: head = [1,2,3,4,5] O leetcode.com 2. 문제 설명 linked list인 head가 ..
1. 문제 링크 https://leetcode.com/problems/decode-ways/description/ Decode Ways - LeetCode Can you solve this real interview question? Decode Ways - A message containing letters from A-Z can be encoded into numbers using the following mapping: 'A' -> "1" 'B' -> "2" ... 'Z' -> "26" To decode an encoded message, all the digits must be grouped then leetcode.com 2. 문제 설명 주어진 숫자 문자열을 알파벳으로 디코딩하는 방법의 수를 찾..
1. 문제 링크 Subsets II - LeetCode Subsets II - LeetCode Can you solve this real interview question? Subsets II - Given an integer array nums that may contain duplicates, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Example leetcode.com 2. 문제 설명 중복된 숫자가 포함된 배열이 주어질 때, 해당 배열의 모든 부분집합을 나열하는 문제 예시) [1, 2, 2]이 주어지면 [[..
1. 문제 링크 https://leetcode.com/problems/partition-list/ Partition List - LeetCode Can you solve this real interview question? Partition List - Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the no leetcode.com 2. 문제 설명 연결 리스트 head = [1,4,3,2,5,2]와 기준 값 x = ..
1. 문제 링크 https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/description/ Partition List - LeetCode Can you solve this real interview question? Partition List - Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the no leetcode.com 2. 문제 설명 정렬된..
1. 문제 링크 https://leetcode.com/problems/search-in-rotated-sorted-array-ii/ Search in Rotated Sorted Array II - LeetCode Can you solve this real interview question? Search in Rotated Sorted Array II - There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values). Before being passed to your function, nums is rotated at an unknown pivot leetcode.com 2. 문제 설명 오..
1. 문제 링크 https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/ Remove Duplicates from Sorted Array II - LeetCode Can you solve this real interview question? Remove Duplicates from Sorted Array II - Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place [https://en.wikipedia.org/wiki/In-place_algorithm] such that each unique elemen leetcode.com..