일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- list
- 리트코드
- dfs
- backtracking
- tree
- Binary
- 이진트리
- leetcode
- 문자열
- binary search
- matrix
- sorting
- 미디움
- recursive
- binary tree
- Medium
- 쉬움
- math
- Array
- easy
- 중간
- 재귀
- Python
- two pointers
- string
- HashTable
- hash table
- linked list
- DP
- Depth-first Search
- Today
- Total
목록2024/02 (31)
부부의 코딩 성장 일기
1. 문제 링크 https://leetcode.com/problems/palindrome-linked-list/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 2. 문제 설명 주어진 연결 리스트가 팰린드롬(좌우 뒤집어 같은 것)인지 확인하여 True 또는 False를 반환 3. 처음 풀이 head의 값을 리스트에 하나씩 추가한 후 그 리스트와 역순이 같으면 ..
1. 문제 링크 https://leetcode.com/problems/implement-queue-using-stacks/ Implement Queue using Stacks - LeetCode Can you solve this real interview question? Implement Queue using Stacks - Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (push, peek, pop, and empty). Implement t leetcode.com 2. 문제 설명 큐(Queue)는 ..
1. 문제 링크 https://leetcode.com/problems/implement-stack-using-queues/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 2. 문제 설명 queue를 활용하여 stack을 구현하라. 여기서 stack은 last-in-first-out (LIFO)를 의미 일반적인 stack은 push, top, pop, empt..
1. 문제 링크 https://leetcode.com/problems/power-of-two/description/ 2. 문제 설명 정수 n이 주어졌을 때, 만약 해당 수가 2의 거듭제곱이면 True를 아니면 False를 반환 예시1) n=1일 때, 1은 2의 0 거듭제곱이므로 True 반환 예시2) n=16일 때, 16은 2의 4 거듭제곱이므로 True 반환 예시3) n=3일 때, 3은 2의 거듭제곱이 아니므로 False를 반환 3. 처음 풀이 Follow up에서 loops나 recursion을 쓰지 않고, 풀 수 있는지를 물어봐서 다른 방법을 생각해보다가, 10진법을 2진법으로 바꾸었을 때, 2의 거듭제곱이라면 10000, 100, 10 등의 형태일 것이기 때문에, 1을 제외한 값을 int로 변환했..
1. 문제 링크 Summary Ranges - LeetCode LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 2. 문제 설명 정렬된 정수 배열이 주어졌을 때, 연속된 범위를 요약하여 문자열의 리스트로 반환하는 것 예시) [0,1,2,4,5,7]이 주어지면, 이 배열을 연속된 범위로 요약하면 ["0->2","4->5","7"] 3. 처음 풀이 two point..

1. 문제 링크 https://leetcode.com/problems/invert-binary-tree/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 2. 문제 설명 binary tree의 root가 주어졌을 때, 이를 invert한 root를 반환 예시) input이 [4,2,7,1,3,6,9] 이면 output이 [4,7,2,9,6,3,1]로 각 노드의..
1. 문제 링크 https://leetcode.com/problems/count-complete-tree-nodes/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 2. 문제 설명 주어진 완전 이진 트리의 노드 개수를 반환하는 문제 완전 이진 트리란 마지막 레벨을 제외한 모든 레벨에서 노드가 왼쪽에서 오른쪽으로 채워진 이진 트리를 의미, 모든 레벨의 노드는 ..

1. 문제 링크 https://leetcode.com/problems/unique-binary-search-trees/description/ Unique Binary Search Trees - LeetCode Can you solve this real interview question? Unique Binary Search Trees - Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n. Example 1: [https://assets.leetcode leetcode.com 2. 문제 설명 정수 n이..