"20가지 필수 알고리즘을 통해 코딩 인터뷰 프로가 되기" 3편입니다. 마지막 편입니다.
당신이 알아야 할 20가지 코딩 알고리즘 (1) - [https://careerly.co.kr/comments/75731]
당신이 알아야 할 20가지 코딩 알고리즘 (2) - [https://careerly.co.kr/comments/76235]
1️⃣ K-way Merge
- 사용: 정렬된 배열의 리스트를 다룰 때
- 자료구조: Array, Queue, Heap
- 예시 문제:
[https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/]
2️⃣ 0/1 Knapsack
- 사용: 이득을 최대화 하기 위해 중복 없이 각 아이템을 넣을까(1) 말까(0) 선택할 때
- 자료구조: Array, HashTable
- 예시 문제:
[https://leetcode.com/problems/partition-equal-subset-sum/]
3️⃣ Unbounded Knapsack
- 사용: 이득을 최대화 하기 위해 중복 제한 없이 각 아이템을 선택할 때
- 자료구조: Array, HashTable
- 예시 문제:
[https://leetcode.com/problems/coin-change/]
4️⃣ Fibonacci Numbers
- 사용: 어떤 수열의 항이, 앞의 두 항의 합과 같은 수열을 구할 때
- 자료구조: Array, HashTable
- 예시 문제:
[https://leetcode.com/problems/house-robber/]
5️⃣ Palindromic Subsequence
- 사용: 거꾸로 읽어도 똑같은 문자열을 만들 때
- 자료구조: Array, HashTable
- 예시 문제:
[https://leetcode.com/problems/longest-palindromic-subsequence/]
6️⃣ Longest Common Substring
- 사용: 최장 공통 문자열을 다룰 때
- 자료구조: Array, HashTable
- 예시 문제:
[https://leetcode.com/problems/edit-distance/]
7️⃣ Topological Sort
- 사용: 순서가 정해져있는 작업을 차례대로 수행해야 할 때
- 자료구조: Array, HashTable, Queue, Graph
- 예시 문제:
[https://leetcode.com/problems/task-scheduler/]