- 알고리즘 풀이를 정리합니다!
- 원래 블로그에 정리하던 풀이는 여기 링크로 남깁니다!
- 블로그/Github 동시 업데이트 예정!
링크 | 사이트 |
---|---|
Python 알고리즘 | HackerRank, 프로그래머스, LeetCode |
Swift 알고리즘 | HackerRank, 프로그래머스, LeetCode |
Problem | Solution | Category | Language |
---|---|---|---|
Spiral Matrix | Spiral Matrix | Array |
Swift |
Best Time to Buy and Sell Stock II | Best Time to Buy and Sell Stock II | Array |
Swift |
Find All Numbers Disappeared in an Array | Find All Numbers Disappeared in an Array | Array |
Swift |
Merge Intervals | Merge Intervals | Array |
Swift |
Rotate Array | Rotate Array | Array |
Swift |
Move Zeroes | Move Zeroes | Array |
Swift |
Sort Colors | Sort Colors | Array |
Swift |
Longest Consecutive Sequence | Longest Consecutive Sequence | Array |
Swift |
Find the Duplicate Number | Find the Duplicate Number | Array |
Swift |
Find Minimum in Rotated Sorted Array | Find Minimum in Rotated Sorted Array | Array |
Swift |
Find Peak Element | Find Peak Element | Array |
Swift |
Remove Element | Remove Element | Array |
Swift |
Matrix Diagonal Sum | Matrix Diagonal Sum | Array |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Count Negative Numbers in a Sorted Matrix | Count Negative Numbers in a Sorted Matrix | Binary Search |
Swift |
Search Insert Position | Search Insert Position | Binary Search |
Swift |
Search in Rotated Sorted Array | Search in Rotated Sorted Array | Binary Search |
Swift |
Find First and Last Position of Element in Sorted Array | Find First and Last Position of Element in Sorted Array | Binary Search |
Swift |
Search a 2D Matrix | Search a 2D Matrix | Binary Search |
Swift |
Search a 2D Matrix II | Search a 2D Matrix II | Binary Search |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Maximum Subarray | Maximum Subarray | Dynamic Programming |
Swift |
In Subsequence | In Subsequence | Dynamic Programming |
Swift |
Best Time to Buy and Sell Stock | Best Time to Buy and Sell Stock | Dynamic Programming |
Swift |
Min Cost Climbing Stairs | Min Cost Climbing Stairs | Dynamic Programming |
Swift |
Counting Bits | Counting Bits | Dynamic Programming |
Swift |
Count Square Submatrices with All Ones | Count Square Submatrices with All Ones | Dynamic Programming |
Swift |
Unique Paths | Unique Paths | Dynamic Programming |
Swift |
Unique Paths II | Unique Paths II | Dynamic Programming |
Swift |
Minimum Path Sum | Minimum Path Sum | Dynamic Programming |
Swift |
Climbing Stairs | Climbing Stairs | Dynamic Programming |
Swift |
Triangle | Triangle | Dynamic Programming |
Swift |
House Robber | House Robber | Dynamic Programming |
Swift |
Pascal's Triangle | Pascal's Triangle | Dynamic Programming |
Swift |
Longest Palindromic Substring | Longest Palindromic Substring | Dynamic Programming |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Find the Town Judge | Find the Town Judge | Graph |
Swift |
Minimum Number of Vertices to Reach All Nodes | Minimum Number of Vertices to Reach All Nodes | Graph |
Swift |
Find Center of Star Graph | Find Center of Star Graph | Graph |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Jump Game | Jump Game | Greedy |
Swift |
Container With Most Water | Container With Most Water | Two-Pointers Greedy |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Number of Good Pairs | Number of Good Pairs | Hash Table |
Swift |
Roman to Integer | Roman to Integer | Hash Table |
Swift |
Group Anagrams | Group Anagrams | Hash Table |
Swift |
Partition Labels | Partition Labels | Hash Table |
Swift |
Happy Number | Happy Number | Hash Table |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Merge Two Sorted Lists | Merge Two Sorted Lists | Linked List |
Swift |
Reverse Linked List | Reverse Linked List | Linked List |
Swift |
Middle of the Linked List | Middle of the Linked List | Linked List |
Swift |
Remove Nth Node From End of List | Remove Nth Node From End of List | Linked List |
Swift |
Remove Duplicates from Sorted List II | Remove Duplicates from Sorted List II | Linked List |
Swift |
Add Two Numbers | Add Two Numbers | Linked List |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Palindrome Number | Palindrome Number | Math |
Swift |
Excel Sheet Column Number | Excel Sheet Column Number | Math |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Valid Anagram | Valid Anagram | String |
Swift |
Valid Palindrome | Valid Palindrom | String |
Swift |
Reverse String | Reverse String | String |
Swift |
Reverse Integer | Reverse Integer | String |
Swift |
First Unique Character in a String | First Unique Character in a String | String |
Swift |
Longest Substring Without Repeating Characters | Longest Substring Without Repeating Characters | String |
Swift |
Valid Parentheses | Valid Parentheses | String |
Swift |
Length of Last Word | Length of Last Word | String |
Swift |
Reverse Words in a String III | Reverse Words in a String III | String |
Swift |
Implement strStr() | Implement strStr() | String |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Permutation in String | Permutation in String | Sliding Window |
Swift |
Find All Anagrams in a String | Find All Anagrams in a String | Sliding Window |
Swift |
Subarray Product Less Than K | Subarray Product Less Than K | Sliding Window |
Swift |
Minimum Size Subarray Sum | Minimum Size Subarray Sum | Sliding Window |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Daily Temperatures | Daily Temperatures | Stack |
Swift |
Backspace String Compare | Backspace String Compare | Stack |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
3sum | 3sum | Two-Pointers |
Swift |
Squares of a Sorted Array | Squares of a Sorted Array | Two-Pointers |
Swift |
Two Sum II - Input array is sorted | Two Sum II - Input array is sorted | Two-Pointers |
Swift |
Next Permutation | Next Permutation | Two-Pointers |
Swift |
Interval List Intersections | Interval List Intersections | Two-Pointers |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
Binary Tree Inorder Traversal | Binary Tree Inorder Traversal | Tree |
Swift |
Merge Two Binary Trees | Merge Two Binary Trees | Tree |
Swift |
Populating Next Right Pointers in Each Node | Populating Next Right Pointers in Each Node | Tree |
Swift |
Symmetric Tree | Symmetric Tree | Tree |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
피보나치 수 | 피보나치 수 | Dynamic Programming |
Swift |
가장 큰 정사각형 찾기 | 가장 큰 정사각형 찾기 | Dynamic Programming |
Swift |
멀리 뛰기 | 멀리 뛰기 | Dynamic Programming |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
가장 큰 수 | 가장 큰 수 | Sorting |
Swift |
파일명 정렬 | 파일명 정렬 | Sorting |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
짝지어 제거하기 | 짝지어 제거하기 | Stack |
Swift |
다리를 지나는 트럭 | 다리를 지나는 트럭 | Stack |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
베스트앨범 | 베스트앨범 | Hash |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
디스크 컨트롤러 | 디스크 컨트롤러 | Heap |
Swift |
이중우선순위큐 | 이중우선순위큐 | Heap |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
후보키 | 후보키 | Recursive |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
카펫 | 카펫 | Brute-Force |
Swift |
소수 찾기 | 소수 찾기 | Brute-Force |
Swift |
소수 만들기 | 소수 만들기 | Brute-Force |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
체육복 | 체육복 | Greedy |
Swift |
큰 수 만들기 | 큰 수 만들기 | Greedy |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
가장 먼 노드 | 가장 먼 노드 | BFS |
Swift |
타겟 넘버 | 타겟 넘버 | DFS |
Swift |
네트워크 | 네트워크 | DFS |
Swift |
순위 | 순위 | DFS |
Swift |
여행 경로 | 여행 경로 | DFS |
Swift |
단어 변환 | 단어 변환 | DFS |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
배달 | 배달 | Graph |
Swift |
합승 택시 요금 | 합승 택시 요금 | Graph |
Swift |
섬 연결하기 | 섬 연결하기 | Graph |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
보석 쇼핑 | 보석 쇼핑 | Two-Pointers |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
순위 검색 | 순위 검색 | Binary Search |
Swift |
입국심사 | 입국심사 | Binary Search |
Swift |
Problem | Solution | Category | Language |
---|---|---|---|
메뉴 리뉴얼 | 메뉴 리뉴얼 | Implement |
Swift |
프렌즈4블록 | 프렌즈4블록 | Implement |
Swift |
오픈채팅방 | 오픈채팅방 | Implement |
Swift |
수식 최대화 | 수식 최대화 | Implement |
Swift |
뉴스 클러스터링 | 뉴스 클러스터링 | Implement |
Swift |
괄호 변환 | 괄호 변환 | Implement |
Swift |
비밀지도 | 비밀지도 | Implement |
Swift |
다트 | 다트 | Implement |
Swift |
실패율 | 실패율 | Implement |
Swift |
문자열 압축 | 문자열 압축 | Implement |
Swift |
튜플 | 튜플 | Implement |
Swift |
키패드 누르기 | 키패드 누르기 | Implement |
Swift |
신규 아이디 추천 | 신규 아이디 추천 | Implement |
Swift |
올바른 괄호 | 올바른 괄호 | Implement |
Swift |
약수의 개수와 덧셈 | 약수의 개수와 덧셈 | Implement |
Swift |
예산 | 예산 | Implement |
Swift |
괄호 회전하기 | 괄호 회전하기 | Implement |
Swift |
방금 그 곡 | 방금 그 곡 | Implement |
Swift |
행렬의 곱셈 | 행렬의 곱셈 | Implement |
Swift |
다음 큰 숫자 | 다음 큰 숫자 | Implement |
Swift |
영어 끝말잇기 | 영어 끝말잇기 | Implement |
Swift |
이진 변환 반복하기 | 이진 변환 반복하기 | Implement |
Swift |
방문 길이 | 방문 길이 | Implement |
Swift |
거리두기 확인하기 | 거리두기 확인하기 | Implement |
Swift |
삼각 달팽이 | 삼각 달팽이 | Implement |
Swift |
표 편집 | 표 편집 | Implement |
Swift |
자물쇠와 열쇠 | 자물쇠와 열쇠 | Implement |
Swift |
행렬 테두리 회전하기 | 행렬 테두리 회전하기 | Implement |
Swift |
점프와 순간 이동 | 점프와 순간 이동 | Implement |
Swift |