Phụ lục

Phụ lục A - Bảng pattern → loại bài

Sử dụng bảng này để tra ngược: “đề bài giống thế này thì chọn pattern gì?”

Dấu hiệu đề bài Pattern (Chương)
“Find pair / triplet with sum” Two Pointers (26), Hash (6)
“Longest / shortest substring with condition” Sliding Window (27)
“Find element in sorted array” Binary Search (5)
“Min/max X such that …” Search on Answer (25)
“Number of subarray …” Prefix Sum + Hash (19, 6)
“Connected components / cycle in undirected” Union Find (24), DFS/BFS
“Shortest path unweighted” BFS (10)
“Shortest path weighted ≥ 0” Dijkstra (30)
“Shortest path with negative” Bellman-Ford
“Topological order / cycle in directed” Topo Sort (13)
“Min cost to connect all” MST (33)
“Next greater / smaller element” Monotonic Stack (18, 8.5)
“Sliding window max/min” Monotonic Deque (18.4)
“Substring matching” KMP (35), Rolling Hash (34), Z (36)
“Prefix matching, dictionary lookup” Trie (23)
“Max XOR pair” Trie binary (41)
“All permutations / subsets / combinations” Backtracking (3, 28)
“Min steps / number of ways” DP (29), Combinatorics DP (44)
“Game with 2 players optimal” Game Theory DP (31)
“Path in tree / depth/diameter/LCA” Tree DFS (11), Tree DP (42)
“Range sum / update” Prefix Sum (19), Fenwick/Segment (22)
“Median / kth largest stream” Heap (15)
“n ≤ 20 with subset” Bitmask DP (40)

Bảng phân biệt pattern dễ nhầm

BFS vs DFS vs Union Find (cho connectivity / components):

Pattern Khi dùng Time Space
BFS Shortest path unweighted, level-order O(V + E) O(V)
DFS Connectivity, cycle detection, topo sort, đường đi bất kỳ O(V + E) O(V) recursion stack
Union Find Online add edge, query “connected?”, offline edge sorting O((V + E) · α) O(V)

Binary Search thường vs Search on Answer:

Pattern Search trên gì Predicate
Binary Search thường (Ch 5) Index trong mảng đã sort nums[mid] vs target
Search on Answer (Ch 25) Giá trị đáp án check(mid) đơn điệu T/F

Sliding Window vs Two Pointers:

Pattern Khi dùng Window
Two Pointers 2-đầu (Ch 26) Sort + tìm cặp (sum, distance) Hội tụ từ 2 phía
Sliding Window same-direction (Ch 27) Longest/shortest subarray với điều kiện monotonic Mở rộng r, co l

KMP vs Z vs Rolling Hash:

Pattern Preprocess Khi tốt Khi xấu
KMP (Ch 35) LPS array O(m) Deterministic, in-place LPS construction khó hiểu
Z (Ch 36) Z array O(n) Dễ hình dung hơn LPS Tương đương KMP perf
Rolling Hash (Ch 34) Powers + prefix hash Multiple pattern, distinct count Collision risk

Dijkstra vs BFS+BS vs DSU offline (cho min/max path):

Pattern Khi dùng Complexity
Dijkstra (Ch 30) Weighted ≥ 0, online query O((V+E) log V)
BS + BFS (Ch 37) Predicate monotonic trên threshold O(log · (V+E))
DSU offline (Ch 24, 33) Process query theo thứ tự + sort cạnh O((V+E) · α)

Recursion vs Backtracking vs DFS vs Top-down DP:

Pattern Đặc trưng
Recursion (Ch 3) Đệ quy thuần, không track choice/state
Backtracking (Ch 28) choose → explore → unchoose, liệt kê tất cả
DFS (Ch 11, 12) Duyệt graph/tree, mark visited
Top-down DP (Ch 29) Recursion + @cache, overlapping subproblems

Phụ lục B - Python 3 cookbook (35 snippet hay dùng)

# 1. Counter
from collections import Counter
Counter("anagram").most_common(2)        # [('a',3), ('n',1)]

# 2. defaultdict
from collections import defaultdict
groups = defaultdict(list)
groups[key].append(val)

# 3. deque
from collections import deque
dq = deque([1,2,3]); dq.appendleft(0); dq.pop()

# 4. heapq (min-heap; max-heap = negate)
import heapq
h = []; heapq.heappush(h, (priority, value))
heapq.nsmallest(3, lst, key=lambda x: x.score)
# Max-heap idiom:
heapq.heappush(h, -value)
neg = heapq.heappop(h); val = -neg

# 5. bisect (binary search)
from bisect import bisect_left, insort
i = bisect_left(sorted_lst, x)
insort(sorted_lst, x)        # insert maintain sorted

# 6. functools.cache (memoization)
from functools import cache
@cache
def dp(state): ...
# Cẩn thận: state phải hashable. List/dict → tuple/frozenset.

# 7. itertools
from itertools import (
    combinations, permutations, product, accumulate, pairwise
)
list(combinations([1,2,3], 2))      # [(1,2),(1,3),(2,3)]
list(accumulate([1,2,3,4]))         # [1, 3, 6, 10]
list(pairwise([1,2,3,4]))           # [(1,2),(2,3),(3,4)]

# 8. cmp_to_key cho sort custom
from functools import cmp_to_key
arr.sort(key=cmp_to_key(lambda a, b: a-b))

# 9. math
from math import gcd, lcm, comb, factorial, inf, log2, ceil, floor
gcd(12, 18)         # 6
lcm(4, 6)           # 12 (Python 3.9+)
comb(5, 2)          # 10
log2(8)             # 3.0

# 10. SortedList (cần pip install sortedcontainers)
from sortedcontainers import SortedList
sl = SortedList()
sl.add(x); sl.remove(x)            # O(log n)
sl.bisect_left(x)

# 11. Increase recursion limit
import sys
sys.setrecursionlimit(10**6)

# 12. Bit operations
bin(12)             # '0b1100'
(12).bit_count()    # 2 (Python 3.10+)
(12 & -12)          # 4 (lowest set bit)
(12 & (12 - 1))     # 8 (clear lowest set bit)

# 13. String / character
chr(97); ord('a')   # 97; 'a'
'abc'.zfill(5)      # '00abc'
str(123).rjust(5)   # '  123'

# 14. List unpacking
a, *rest, b = [1, 2, 3, 4, 5]   # a=1, rest=[2,3,4], b=5

# 15. Walrus operator (Python 3.8+)
if (n := len(lst)) > 10:
    print(f"too long: {n}")

(Snippet 16-35 có thể tham khảo trong code mỗi chương.)


Phụ lục C - Template code 20 patterns

Các template code đã có sẵn ở đầu mỗi chương (mục “Template code”). Đây là index nhanh:

# Pattern Template ở chương
1 Two Pointers Ch. 26
2 Sliding Window Ch. 27
3 Binary Search Ch. 5
4 Search on Answer Ch. 25
5 Prefix Sum Ch. 19
6 Monotonic Stack/Deque Ch. 18
7 BFS Ch. 10
8 DFS Ch. 11
9 Backtracking Ch. 28
10 Union Find Ch. 24
11 Topological Sort Ch. 13
12 Dijkstra Ch. 30
13 MST (Kruskal+Prim) Ch. 33
14 Trie Ch. 23
15 Fenwick / Segment Ch. 22
16 LCS / LIS Ch. 29
17 Knapsack Ch. 29
18 Tree DP Ch. 42
19 Bitmask DP Ch. 40
20 KMP / Z Ch. 35, 36

Phụ lục D - 50 bài must-do trước phỏng vấn 1 tuần

Tinh giản, dedupe theo chương. Mỗi bài LC chỉ xuất hiện 1 lần.

Array & String (8): LC 1, 121, 238, 11, 53, 49, 76, 3.

Linked List (5): LC 206, 21, 141, 25, 146.

Tree (5): LC 104, 102, 98, 236, 124.

Graph & BFS/DFS (7): LC 200, 207, 269, 994, 127, 133, 743.

Heap & Sort (3): LC 215, 23, 56.

Hash & Sliding Window (4): LC 49 (đã ở Array, skip), LC 76 (đã ở Array, skip), LC 424, 560.

Binary Search (3): LC 33, 34, 875.

DP (8): LC 70, 198, 322, 300, 72, 152, 416, 309.

Backtracking (3): LC 46, 78, 22.

Bit / String parser (4): LC 136, 421, 224, 8.

Note: LC 121 (Stock I) ưu tiên hơn LC 207 (Course Schedule) cho ngày đầu - Stock dễ làm tâm lý nhẹ trước khi vào graph. LC 49, 76 xuất hiện trong cả Array và Sliding Window family - chỉ tính 1 lần ở Array (tier xuất hiện sớm hơn).


Phụ lục E - Behavioral interview kèm STAR framework

STAR framework

S Situation Mô tả bối cảnh
(1-2 câu)    
T Task Vấn đề / yêu cầu của bạn
A Action Bạn đã làm gì cụ thể (focus ở đây!)
     
R Result Kết quả + bài học

10 câu thường gặp

  1. “Tell me about a challenging bug you solved.”
  2. “Describe a conflict with a coworker.”
  3. “What’s your biggest weakness?”
  4. “Why do you want to work at [company]?”
  5. “Tell me about a project you’re proud of.”
  6. “Describe a time you missed deadline.”
  7. “How do you prioritize tasks?”
  8. “Tell me about a time you took initiative.”
  9. “Describe a time you received critical feedback.”
  10. “Why are you leaving your current job?”

Mẹo

  • Cụ thể, không nói chung chung: “Em từng fix race condition ở service X bằng cách thay lock thành lock-free queue” thay vì “Em giỏi gỡ lỗi”.
  • Số liệu: “Giảm latency từ 200ms → 50ms” - quantify impact.
  • Honest: weakness phải thật, kèm “tôi đang cải thiện bằng …”.

Phụ lục F - System design coding hybrid

Một số vòng phỏng vấn yêu cầu cả design + implement. Ví dụ:

Bài Chương liên quan
LRU Cache (LC 146) Ch. 6, 7
LFU Cache (LC 460) Ch. 7
Snake Game (LC 353) Ch. 7 (deque)
Rate Limiter Ch. 14 (interval)
Twitter Feed (LC 355) Ch. 15 (heap)
Search Autocomplete (LC 642) Ch. 23 (Trie)
Tic-Tac-Toe (LC 348) Ch. 6 (hash)
File System (LC 588) Ch. 23
Stack with Pop Middle Ch. 22 (DLL)

Quy trình: làm rõ scope → thiết kế class/interface → cài đặt các method → test.


Phụ lục G - Tài liệu tham khảo & follow-up

Sách kinh điển

  • Cracking the Coding Interview (CTCI) - Gayle Laakmann McDowell. Bao quát.
  • Elements of Programming Interviews (EPI) - Adnan Aziz. Sâu, có cả Python/Java/C++.
  • Introduction to Algorithms (CLRS) - Cormen et al. Textbook, dùng tra cứu.
  • Competitive Programming Handbook - Antti Laaksonen. Free PDF online.

Online platforms

  • LeetCode - practice, contest hàng tuần.
  • Codeforces - competitive programming, level >= LC.
  • NeetCode 150 - danh sách “must-do” tinh giản (neetcode.io).
  • HackerRank - phỏng vấn syntax cơ bản.

Vietnamese resources

  • VNOI - site OI Việt Nam, nhiều bài tutorial DSA tiếng Việt.
  • MathVN, EngineerPro - community, mentorship.

Newsletters & blogs

  • Hello Interview - blog system design.
  • High Scalability - case studies hệ thống thật.
  • Pragmatic Engineer - career advice tech.

YouTube channels (English)

  • NeetCode - pattern-based LC explanation.
  • Tushar Roy - phân tích sâu các thuật toán.
  • William Fiset - graph algorithms.

Lời khuyên cuối

  • Đừng học thuộc lời giải. Học pattern.
  • Mock interview với bạn bè / Pramp / interviewing.io.
  • Behavioral cũng quan trọng - không ít ứng viên không đạt vì phần behavioral / culture fit, dù DSA giải tốt.
  • Sleep & exercise. Sức khoẻ tinh thần > 1 chương DSA.

Phụ lục H - Glossary thuật ngữ Việt-Anh

Tiếng Anh Tiếng Việt Định nghĩa ngắn
Invariant Bất biến Thuộc tính luôn đúng tại mọi điểm trong vòng lặp / đệ quy
State Trạng thái Đại lượng đủ để mô tả bài con (DP, game theory)
Transition Bước chuyển dp[next] = f(dp[curr]) - quan hệ giữa state
Subproblem Bài con Bài nhỏ hơn dùng để xây bài lớn (DP, D&C)
Optimal substructure Cấu trúc con tối ưu Lời giải tối ưu được build từ lời giải con tối ưu
Overlapping subproblems Bài con trùng lặp Subproblem xuất hiện nhiều lần → cache được
Monotonic Đơn điệu Tăng / giảm theo 1 chiều (sort, stack, predicate BS)
Amortized Khấu hao Trung bình mỗi op O(1) dù worst-case có thể O(n)
Greedy Tham lam Mỗi bước chọn cái tốt nhất tại chỗ
Heuristic Heuristic Quy tắc giúp lựa chọn không bảo đảm tối ưu
Trie Trie (prefix tree) Cây mà mỗi node = 1 ký tự, đường đi = 1 prefix
Adjacency list Danh sách kề graph[u] = [v1, v2, ...]
In-place In-place Sửa trực tiếp input, không tạo cấu trúc phụ
Stable sort Sort ổn định Giữ thứ tự gốc của các phần tử bằng nhau (Python’s sorted là stable)
Sentinel Sentinel Phần tử biên ảo để tránh special-case (dummy head, [-1, n])
Pivot Pivot Phần tử chuẩn để partition (quicksort, quickselect)
Backtracking Backtracking Đệ quy + undo state khi quay lui
Memoization Memoization Cache kết quả subproblem (top-down DP)
Tabulation Tabulation Build DP table bottom-up
Bitmask Bitmask Encode subset bằng int (bit i = phần tử i có/không)
LIS LIS Longest Increasing Subsequence
LCS LCS Longest Common Subsequence
LPS LPS Longest Prefix Suffix (KMP)
MST MST Minimum Spanning Tree
DSU DSU Disjoint Set Union (Union Find)
DAG DAG Directed Acyclic Graph (đồ thị có hướng không chu trình)
BST BST Binary Search Tree
Big-O Big-O Notation độ phức tạp tiệm cận
α(n) Alpha(n) Hàm Ackermann ngược (≈ 4 với mọi n thực tế)

Phụ lục I - Index theo LC number

Tra theo số LeetCode → bài trong sách. Hỗ trợ tra ngược nhanh.

LC # Bài Chương Mục
1 Two Sum 1 1.1
2 Add Two Numbers 7 7.7
3 Longest Substring Without Repeating 27 27.1
4 Median of Two Sorted Arrays 25 25.5
8 String to Integer (atoi) 2 2.4
10 Regular Expression Matching 32 32.4
11 Container With Most Water 1, 26 1.5, 26.3
14 Longest Common Prefix 2 2.3
15 3Sum 26 26.1
17 Letter Combinations Phone 28 28.4
18 4Sum 26 26.6
19 Remove Nth From End 7 7.5
20 Valid Parentheses 8 8.1
21 Merge Two Sorted Lists 7 7.2
22 Generate Parentheses 3 3.4
23 Merge k Sorted Lists 15 15.5
25 Reverse Nodes in k-Group 7 7.9
28 strStr() 35, 36 35.1, 36.2
33 Search Rotated Sorted Array 5 5.5
34 Find First/Last Position 5 5.4
35 Search Insert Position 5 5.2
37 Sudoku Solver 28 28.8
38-… (xem chương tương ứng)    
42 Trapping Rain Water 26 26.2
45 Jump Game II 16 16.2
46 Permutations 3 3.5
47 Permutations II 28 28.3
49 Group Anagrams 2 2.5
50 Pow(x, n) 3, 17 3.2, 17.4
51 N-Queens 28 28.7
53 Maximum Subarray 17 17.1
55 Jump Game 16 16.1
56 Merge Intervals 4, 14 4.2, 14.1
57 Insert Interval 14 14.2
62 Unique Paths 44 44.1
63 Unique Paths II 44 44.2
65 Valid Number 32 32.5
69 Sqrt(x) 5 5.6
72 Edit Distance 29 29.3
75 Sort Colors 4, 26 4.1, 26.4
76 Minimum Window Substring 27 27.2
77 Combinations 28 28.1
78 Subsets 3 3.6
79 Word Search 28 28.9
80 Remove Duplicates Sorted II 26 26.5
84 Largest Rectangle Histogram 18 18.3
90 Subsets II 28 28.2
93 Restore IP Addresses 28 28.11
98 Validate BST 11, 22 11.4, 22.1
99 Recover BST 22 22.2
102 Level Order Traversal 10 10.1
104 Max Depth Binary Tree 11 11.1
113 Path Sum II 11 11.2
121 Best Time to Buy/Sell 1 1.2
124 Max Path Sum 22 22.4
125 Valid Palindrome 2 2.2
127 Word Ladder 10 10.3
128 Longest Consecutive 6 6.2
131 Palindrome Partitioning 28 28.6
132 Palindrome Partitioning II 29 29.13
133 Clone Graph 9 9.2
134 Gas Station 16 16.3
135 Candy 16 16.6
136 Single Number 21 21.1
138 Copy List Random 7 7.8
140 Word Break II 28 28.10
141 Linked List Cycle 7 7.3
143 Reorder List 7 7.12
146 LRU Cache 6, 7 6.6, 7.11
148 Sort List 7 7.10
150 Eval RPN 8 8.4
151 Reverse Words 2 2.6
152 Max Product Subarray 29 29.12
155 Min Stack 8 8.2
179 Largest Number 4 4.3
187 Repeated DNA 34 34.1
188 Stock IV 29 29.10
189 Rotate Array 1 1.6
191 Number of 1 Bits 21 21.2
198 House Robber I - (tự luyện Ch 29)
200 Number of Islands 12 12.1
201 Bitwise AND Range 21 21.5
204 Count Primes 20 20.1
205 Isomorphic Strings 6 6.5
206 Reverse Linked List 3, 7 3.3, 7.1
207 Course Schedule 9 9.4
208 Implement Trie 23 23.1
210 Course Schedule II 13 13.1
211 Add and Search Word 23 23.2
212 Word Search II 23 23.3
213 House Robber II 29 29.11
215 Kth Largest 15, 17 15.1, 17.3
217 Contains Duplicate 6 6.1
224 Basic Calculator - (xem Ch 32)
227 Basic Calculator II 32 32.1
232 Implement Queue Stacks 8 8.3
234 Palindrome Linked List 7 7.6
236 LCA Binary Tree 11 11.6
238 Product Except Self 1, 19 1.3, 19.5
239 Sliding Window Maximum 18, 27 18.4, 27.6
241 Different Ways Parentheses 17 17.5
242 Valid Anagram 2 2.1
253 Meeting Rooms II 4, 14 4.4, 14.4
264 Ugly Number II 20 20.2
269 Alien Dictionary 13 13.2
273 Integer to English Words 32 32.6
278 First Bad Version 5 5.3
280 Wiggle Sort 4 4.6
282 Expression Add Operators 28 28.12
283 Move Zeroes 1 1.4
286 Walls and Gates 12 12.5
292 Nim Game 31 31.1
295 Find Median Stream 15 15.3
297 Serialize Tree 22 22.3
300 LIS 29 29.2
303 Range Sum Immutable 19 19.1
304 Range Sum 2D 19 19.4
305 Number Islands II 24 24.4
307 Range Sum Mutable 22 22.6
309 Stock Cooldown 29 29.9
310 Min Height Trees 13 13.3
312 Burst Balloons 29 29.14
315 Count Smaller After 22 22.5
322 Coin Change 29 29.7
323 Connected Components 9 9.3
329 Longest Increasing Path 43 43.1
332 Reconstruct Itinerary - (Ch 11 follow)
337 House Robber III 11, 42 11.5, 42.1
338 Counting Bits 21 21.3
347 Top K Frequent 6 6.3
354 Russian Doll Envelopes 29, 38, 39 29.6, 38.1, 39.2
363 Max Sum Rectangle ≤ K 38 38.4
368 Largest Divisible Subset 39 39.1
371 Sum of Two Integers 21 21.4
394 Decode String 8, 32 8.6, 32.2
399 Evaluate Division 9 9.6
402 Remove K Digits 18 18.6
407 Trapping Rain Water II 37 37.4
410 Split Array Largest Sum 25 25.3
416 Partition Equal Subset Sum 29 29.5
417 Pacific Atlantic 12 12.4
421 Max XOR Pair 21, 41 21.6, 41.1
424 Char Replacement 27 27.3
435 Non-overlapping Intervals 14 14.3
438 Find All Anagrams 35 35.4
444 Sequence Reconstruction 13 13.5
452 Min Arrows Burst Balloons 14 14.5
455 Assign Cookies 16 16.4
459 Repeated Substring 35 35.3
464 Can I Win 31 31.6
486 Predict the Winner 31 31.3
503 Next Greater II 18 18.2
509 Fibonacci 3 3.1
518 Coin Change II 29 29.8
523 Continuous Subarray Sum 19 19.3
542 01 Matrix 12 12.6
543 Diameter Tree 42 42.3
547 Number of Provinces 24 24.1
560 Subarray Sum K 6, 19 6.4, 19.2
567 Permutation in String 27 27.4
591 Tag Validator - (Ch 32)
621 Task Scheduler 15 15.6
648 Replace Words 23 23.5
664 Strange Printer 29 29.18
673 Number of LIS 38 38.3
684 Redundant Connection 24 24.2
692 Top K Frequent Words 15 15.2
695 Max Area Island 12 12.2
698 Partition K Equal Subsets 40 40.1
704 Binary Search 5 5.1
719 Find K-th Smallest Pair Dist 25 25.4
720 Longest Word 23 23.4
721 Accounts Merge 24 24.3
724 Find Pivot Index 19 19.6
726 Number of Atoms 32 32.3
736 Parse Lisp - (Ch 32 ref)
739 Daily Temperatures 8, 18 8.5, 18.1
743 Network Delay Time 30 30.1
752 Open the Lock 10 10.4
759 Employee Free Time 14 14.6
763 Partition Labels 16 16.5
778 Swim Rising Water 24, 30, 37 24.6, 30.4, 37.1
785 Bipartite Graph 9 9.5
787 Cheapest Flights K Stops 30 30.3
791 Custom Sort String 4 4.5
797 All Paths Source Target 11 11.3
834 Sum of Distances Tree 42 42.5
841 Keys and Rooms 9 (tự luyện)
847 Shortest Path Visit All 40 40.2
876 Middle Linked List 7 7.4
877 Stone Game 31 31.2
907 Sum Subarray Mins 18 18.5
909 Snakes and Ladders 10 10.6
913 Cat and Mouse 31 31.5
920 Music Playlists 44 44.6
935 Knight Dialer 44 44.3
943 Shortest Superstring 40 40.4
947 Most Stones Removed 9 (tự luyện)
952 Largest Comp by Factor 20 20.5
968 Binary Tree Cameras 42 42.2
973 K Closest Points 15 15.4
990 Equation Satisfiability 24 24.5
992 Subarrays K Distinct 27 27.5
994 Rotting Oranges 10 10.2
1011 Capacity Ship Packages 25 25.2
1032 Stream of Characters 23 23.6
1044 Longest Duplicate Substring 34 34.2
1091 Shortest Path Binary Matrix 10 10.5
1102 Path Max Min Value 33 33.6
1125 Smallest Sufficient Team 40 40.3
1135 Connecting Cities 33 33.2
1136 Parallel Courses 13 13.6
1140 Stone Game II 31 31.4
1143 LCS 29 29.1
1168 Optimize Water 33 33.3
1175 Prime Arrangements 20 20.3
1203 Sort Items Groups 13 13.4
1220 Count Vowels Permutation 44 44.4
1235 Job Scheduling 39 39.4
1293 Shortest Path Obstacles 30 30.5
1297 Max Occurrences Substring 35 35.5
1316 Distinct Echo Substrings 34, 36 34.3, 36.6
1326 Min Taps Garden 39 39.6
1349 Max Students Exam 40 40.5
1368 Min Cost Valid Path 30 30.6
1392 Longest Happy Prefix 35 35.6
1425 Constrained Subseq Sum 38 38.5
1434 Hats Permutation 44 44.5
1462 Course Schedule IV 43 43.5
1478 Allocate Mailboxes 38 38.6
1489 Critical MST Edges 33 33.4
1547 Min Cost Cut Stick 29 29.16
1557 Min Vertices Reach 9 (tự luyện)
1584 Min Cost Connect Points 33 33.1
1631 Path Min Effort 30, 37 30.2, 37.2
1638 Strings Differ One Char 34 34.5
1690 Stone Game VII 29 29.17
1691 Stacking Cuboids 39 39.3
1697 Edge Length Limited Paths 33 33.5
1707 Max XOR With Element 41 41.2
1791 Center Star Graph 9 (tự luyện)
1803 Count Pairs XOR Range 41 41.3
1857 Largest Color Value 43 43.3
1879 Min XOR Sum 40 40.6
1901 Peak Element II 37 37.6
1938 Genetic Difference Query 41 41.4
1944 Visible People in Queue 39 39.5
1970 Last Day Cross 37 37.3
1971 Path Exists Graph 9 9.1
2050 Parallel Courses III 43 43.2
2115 Find Recipes 43 43.6
2223 Sum of Scores Built Strings 34, 36 34.6, 36.3
2246 Longest Path Diff Adj 42 42.4
2301 Match Substring Replace 36 36.5
2317 Max XOR After Ops 41 41.6
2392 Build Matrix Conditions 43 43.4
2407 LIS II 38 38.2
2430 Max Deletions String 36 36.4
2513 Min Max Two Arrays 37 37.5
2521 Distinct Prime Factors 20 20.6
2523 Closest Primes Range 20 20.4
2589 (đã thay bằng LC 1462) - -
2858 Min Edge Reversals 42 42.6
2935 Max Strong Pair XOR II 41 41.5

Phụ lục J - Bài xuất hiện nhiều chương (recap map)

Một số bài xuất hiện ở nhiều chương dưới những góc nhìn khác nhau. Đây là map để tránh nhầm lẫn:

LC Bản đầy đủ Recap ở Góc nhìn mới ở phần recap
LC 56 Merge Intervals Ch 4.2 (Sorting) Ch 14.1 (Interval) Sort vs interval pattern
LC 75 Sort Colors Ch 4.1 (Sorting Dutch flag) Ch 26.4 (Two Pointers) Sort vs 3-pointer
LC 11 Container Most Water Ch 1.5 (Array) Ch 26.3 (Two Pointers) Array trick vs converging pointers
LC 98 Validate BST Ch 11.4 (DFS) Ch 22.1 (Advanced Tree) DFS vs BST property
LC 146 LRU Cache Ch 6.6 (Hash Table) Ch 7.11 (Linked List) Hash + DLL vs DLL pattern
LC 206 Reverse LL Ch 7.1 (iterative) Ch 3.3 (recursive) 2 cách giải khác nhau
LC 50 Pow(x, n) Ch 3.2 (Recursion) Ch 17.4 (D&C) Recursion vs D&C framework
LC 215 Kth Largest Ch 15.1 (Heap) Ch 17.3 (D&C) Heap vs quickselect
LC 239 Sliding Window Max Ch 18.4 (Monotonic) Ch 27.6 (Sliding Window) Deque vs window
LC 253 Meeting Rooms II Ch 4.4 (Sorting) Ch 14.4 (Interval) Heap vs sweep line
LC 354 Russian Doll Ch 29.6 (DP) Ch 38.1, 39.2 3 góc nhìn: pure DP, BS + DP, sort + DP
LC 421 Max XOR Ch 21.6 (Bit) Ch 41.1 (Trie) Greedy bit vs binary trie
LC 560 Subarray Sum K Ch 6.4 (Hash) Ch 19.2 (Prefix Sum) Hash vs prefix sum
LC 778 Swim Water Ch 24.6 (DSU offline) Ch 30.4, 37.1 3 cách: DSU, Dijkstra, BS + BFS
LC 1316 Distinct Echo Ch 34.3 (Rolling Hash) Ch 36.6 (Z function) 2 thuật toán khác
LC 1631 Path Min Effort Ch 30.2 (Dijkstra) Ch 37.2 (BS + BFS) 2 cách
LC 2223 Sum of Scores Ch 34.6 (Rolling Hash) Ch 36.3 (Z) 2 thuật toán

Cách đọc recap: tập trung vào “góc nhìn mới” - pattern hiện tại đang nhìn bài cũ theo cách gì, chứ không phải đọc lại lời giải lần thứ hai.


Phụ lục K - Checklist trước phỏng vấn

24 giờ trước: - [ ] Ôn lại Frontmatter 0.2 (UMPIRE)

  • đọc lại 5 bước. - [ ] Đọc lại Phụ lục E (Behavioral) - chuẩn bị 3-4 câu chuyện STAR. - [ ] Ngủ đủ 7-8 tiếng. Đừng thức khuya code. - [ ] Kiểm tra thiết bị (micro, camera, chia sẻ màn hình, IDE / online editor).

1 tuần trước: - [ ] Hoàn thành 50 bài must-do (Phụ lục D). - [ ] 2-3 mock interview (Pramp / interviewing.io / bạn bè). - [ ] Đọc kỹ company-specific patterns (LeetCode tag theo company). - [ ] Review CV/resume - story behind mỗi project.

1 tháng trước: - [ ] Hoàn thành Level 1 + Level 2 (Chương 1-32). - [ ] Mock interview định kỳ 1-2 buổi / tuần. - [ ] Học behavioral framework + chuẩn bị 10 stories STAR. - [ ] Apply rộng (5-10 công ty) để có nhiều buổi practice.


Chúc bạn thành công trên hành trình phỏng vấn! Cảm ơn đã đọc cuốn sách này.

🎓 Khám Phá các khoá học Interview training tại EngineerPro 💬 Đặt lịch tư vấn qua FB Messenger