NI: need improve.
TODO:
- Combine
Time ComplexityandSpace ComplexityintoSolution (Time Complexity & Space Complexity)- Make each problem a folder => for multiple solution & test cases (create README for each problem if necessary)
| Number | Difficulty | Problem | Date | Category | Time Complexity | Space Complexity | Notes |
|---|---|---|---|---|---|---|---|
| 36 | Easy | Search Insert Position | 2023/02/20 | Binary Search | O(log n) | O(1) | - |
| 133 | Medium | Clone Graph | 2023/04/09 | DFS | O(V+E) | - | - |
| 64 | Medium | Minimum Path Sum | 2023/03/27 | DP | O(N^2) | - | bactracking will TLE |
| 67 | Easy | Add Binary | - | - | code | - | - |
| 268 | Easy | Missing Number | 2022/12/19 | - | (NI)O(N^2), | O(N) | FollowUp: bit manipulation |
| 290 | Easy | Word Pattern | 2022/12/18 | - | O(N), | O(N) | - |
| 841 | Medium | Keys and Rooms | 2022/12/20 | BFS | O(N), | O(N) | - |
| 983 | Medium | Minimum Cost For Tickets | 2023/03/28 | DP | O(N) | O(N) | - |
| 989 | Easy | Add to Array-Form of Integer | - | - | code | - | - |
| 1834 | Medium | Single-Threaded CPU | - | heap | code | - | - |
| 1971 | Easy | Find if Path Exists in Graph | - | Union find | code | - | - |
| 2187 | Medium | Minimum Time to Complete Trips | 2023/03/26 | Binary Search | O(log n) | - | - |
| 2601 | Medium | Prime Subtraction Operation | 2023/03/26 | Binary Search, Prime | O(n) | - | - |
| Name | link | Note |
|---|---|---|
| 链表, 双向链表 | Linked List, Double Linked List | - |
| 栈, 队列, 双向队列 | Stack, Queue, Deque | - |
| 优先队列 | Priority Deque | - |
| 图 | Graph Data Structure 邻接矩阵 邻接表 | - |
| Name | Link | Note |
|---|---|---|
| 二分搜索 三分搜索 | Binary Search, Ternary Search | - |
| 快速幂 | Quick Power, 矩阵快速幂 | - |
| 广度优先搜索 | BFS | - |
| 深度优先搜索 | DFS | - |
| 前缀和,差分 | Prefix Sum & Difference | - |
| 并查集 | Disjoint Set Union, Union Find 及带权并查集 | - |
| 计数排序, 快速排序, 归并排序 | Counting Sort, Quick Sort, Merge Sort | - |
| 动态规划 | Dynamic Programming(DP), 背包DP | - |
| 最长公共子序列, 最长上升子序列 | LCS & LIS | - |
| 区间 DP | 区间DP | - |
| 状态压缩DP | 状态压缩DP | - |
| 树状 DP | 树状 DP | - |
| 数位 DP | 数位 DP | - |
| 字符串匹配算法 | KMP | - |
| 最长回文子串 | Manacher | - |