일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- binary tree
- list
- easy
- 미디움
- 리트코드
- 재귀
- Medium
- string
- sorting
- linked list
- recursive
- tree
- HashTable
- Binary
- DP
- Python
- 쉬움
- 이진트리
- two pointers
- dfs
- binary search
- hash table
- leetcode
- Depth-first Search
- 문자열
- backtracking
- 중간
- Array
- matrix
- math
- Today
- Total
목록easy (39)
부부의 코딩 성장 일기
1. 문제 링크 Pascal's Triangle - LeetCode Pascal's Triangle - LeetCode Can you solve this real interview question? Pascal's Triangle - Given an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it as shown: [https://upload.wikimedia.o leetcode.com 2. 문제 설명 파스칼 삼각형을 알아야 함 파스칼 삼각형은 가장 위 꼭대기에는 1, 그 다음 줄에는 1, 1이..
1. 문제 링크 https://leetcode.com/problems/path-sum/ Path Sum - LeetCode Can you solve this real interview question? Path Sum - Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals targetSum. A leaf is a node with no ch leetcode.com 2. 문제 설명 이진 트리 root와, 정수 targetSum가 주어졌을 때, root에서 leaf로 이어..
1. 문제 링크 https://leetcode.com/problems/merge-sorted-array/ 2. 문제 설명 오름차순 정수로 구성된 두 array nums1, nums2와, 각 array의 개수를 m,n이라고 할 때, nums1, nums2를 오름차순 순서로 merge한 list를 반환 전제조건 "in-place" return하는 list는 nums1에 store해야 하며, 결과적으로 nums의 길이는 m+n이 됨 예시1) nums1 = [1,2,3,0,0,0] m=3, nums2 = [2,5,6] n= 3 → [1,2,2,3,5,6] 반환 예시2) nums1 = [1] m=1, nums2 = [] n= 0 → [1] 반환 3. 처음 풀이 nums1의 m+1~m+n 자리에 nums2 elem..
1. 문제 링크 Remove Duplicates from Sorted List - LeetCode Remove Duplicates from Sorted List - LeetCode Can you solve this real interview question? Remove Duplicates from Sorted List - Given the head of a sorted linked list, delete all duplicates such that each element appears only once. Return the linked list sorted as well. Example 1: [https://assets.le leetcode.com 2. 문제 설명 오름차순 정렬된 연결 리스트(linke..
1. 문제 링크 Plus One - LeetCode Plus One - LeetCode Can you solve this real interview question? Plus One - You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most significant to least significant in left-to- leetcode.com 2. 문제 설명 리스트 [1, 2, 3]가 주어지면 123에 1을 더한 124를 리스트로 바꾸어 [1, 2, 4]를 반환 3. 처음 풀이 주어..
1. 문제 링크 Search Insert Position - LeetCode Search Insert Position - LeetCode Can you solve this real interview question? Search Insert Position - Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You must w leetcode.com 2. 문제 설명 정수가 오름차순으로 정렬된 리스트와 하나의 정수가 주어졌을 때 정수를 리스트에..
1. 문제 링크 https://leetcode.com/problems/remove-duplicates-from-sorted-array/ 2. 문제 설명 이번엔 좋아요(13K)보다 싫어요(17.2K)가 더 많지만 그럼에도 상위에 있는 문제 오름차순으로 sort된 nums라는 배열이 있을 때, 중복이 없도록 array를 쌓고, unique 배열의 가장 마지막 index를 반환. 간단해보이지만, 전제조건이 "in-place"로, 기존의 데이터 구조를 변경하지 않고 정렬 또는 변환 작업을 수행해야 함 예시1) nums = [1,1,2] 일 때, nums = [1,2,_]로 변환하고, 2의 index인 1를 반환 예시2) nums = [0,0,1,1,1,2,2,2,3,3,4] 일 때, nums = [0,1,2,3..
1. 문제 링크 Remove Element - LeetCode Remove Element - LeetCode Can you solve this real interview question? Remove Element - Given an integer array nums and an integer val, remove all occurrences of val in nums in-place [https://en.wikipedia.org/wiki/In-place_algorithm]. The order of the elements may be changed. Then r leetcode.com 2. 문제 설명 int가 담긴 리스트 nums와 int인 val이 주어졌을 때, nums에서 val은 모두 제외하고 남은..