linked list
- reverse
- find mid
- merge
tree like structure
- traverse: in/pre/post order
- level order (BFS)
- ReturnType // carry more than one information to caller
permutation / combination
- for, curr, pos, backtracking
- permutation ii, combination ii
- dfs, search and backtracking
array, number
- two pointers
- fast and slow
- meet in middle
- presum array
- partition subroutine for quick sort
- merge sort
- two pointers
binary search
- start + 1 < end, check both arr[start], arr[end]
graph
- bfs, dfs
- topology sort
- dx, dy helper array
data structure
- union find
- trie
- sweep line
- heap, hashheap
- queue
- BFS
- emulate stack
- stack
- DFS
- emulate queue
- segment tree
- query / update
dynamic programming
- sequence
- two strings
- memorized search
sort
- | | time complexity | space complexity | 思想 | stability | | :--- | :--- | :--- | :--- | :--- | | merge sort | O(nlogn), 最好最坏都 O(nlogn) | O(n), 额外数组 | 先局部有序 后全局有序 (分成两部分分别排序再合并) | stable | | quick sort | O(nlogn), 平均复杂度 O(nlogn) | O(1), in-place | 先全局有序 后局部有序 (用partition分为左右) | unstable | | heap sort | O(nlogn) | O(n) | | |
System Design
- Distributed System
- Cache
- OOD
Big Data
- Spark
- SQL
Java
- Memory Model
- Concurrent
- Java 8
Projects
- Cache
- Dataset Management Tool
- Notification Automation
- Spark, UI...
Behavioral