🗺️ Roadmap✍️ Khoa📅 19/04/2026☕ 14 phút đọc

Roadmap: Kế hoạch theo tháng

Tháng 1 — System Design & Kiến Trúc + Algo Nền Tảng

BACKEND TRACK (75 phút/tối)

Tuần 1–2: Kiến trúc phần mềm cốt lõi

Học gì:

  • Monolith vs Microservices vs Modular Monolith — khi nào chọn cái nào
  • Domain-Driven Design (DDD): Bounded Context, Aggregate, Entity, Value Object
  • CQRS và Event Sourcing — hiểu bản chất
  • Hexagonal Architecture (Ports & Adapters)

Cách làm đúng (trong 75 phút):

  • Tối 1–3: Đọc DDIA chương 1–2 (30p đọc + 45p ghi chú & vẽ diagram)
  • Tối 4–5: Vẽ lại kiến trúc hệ thống đang làm, đánh dấu coupling points
  • Tối 6–8: Đọc DDD Distilled, áp dụng Bounded Context cho project thật
  • Tối 9–10: Viết ADR (Architecture Decision Record) đầu tiên, xin review từ lead

Tuần 3–4: Thiết kế API chuyên sâu

Học gì:

  • REST maturity model, gRPC, API versioning trade-offs
  • Rate limiting, cursor-based pagination, idempotency keys

Cách làm đúng (trong 75 phút):

  • Tối 1–3: Review toàn bộ API project hiện tại, liệt kê vi phạm best practice
  • Tối 4–6: Viết OpenAPI 3.1 spec cho 1 nhóm API, refactor
  • Tối 7–10: Implement idempotency key cho 1 POST endpoint + viết tài liệu

Deliverable tháng 1:

  • 1 ADR hoàn chỉnh được review bởi senior/lead
  • 1 PR refactor module theo clean architecture
  • 1 API specification document chuẩn OpenAPI

ALGO TRACK — Tháng 1: Fundamentals (40 phút/tối)

Chủ đề: Array, String, HashMap, Two Pointers, Sorting

Tại sao bắt đầu ở đây: Đây là nền tảng cho mọi pattern phức tạp hơn. Nếu bạn lúng túng với Two Pointers, bạn sẽ không giải được Sliding Window hay DP.

Tuần 1: Array & HashMap

Tối Bài tập Độ khó Thời gian Pattern
T2 Two Sum Easy 20p HashMap lookup
T3 Best Time to Buy and Sell Stock Easy 20p Single pass, track min
T4 Contains Duplicate Easy 15p HashSet
T5 Product of Array Except Self Medium 35p Prefix/Suffix
T6 Maximum Subarray (Kadane's) Medium 30p Kadane's algorithm

Tuần 2: String & HashMap nâng cao

Tối Bài tập Độ khó Thời gian Pattern
T2 Valid Anagram Easy 15p Frequency count
T3 Group Anagrams Medium 30p HashMap + sorting key
T4 Longest Substring Without Repeating Medium 35p Sliding window intro
T5 Valid Parentheses Easy 20p Stack preview
T6 Top K Frequent Elements Medium 35p HashMap + Heap/Bucket sort

Tuần 3: Two Pointers

Tối Bài tập Độ khó Thời gian Pattern
T2 Two Sum II (Sorted Array) Medium 20p Classic two pointers
T3 3Sum Medium 35p Sort + two pointers
T4 Container With Most Water Medium 30p Greedy two pointers
T5 Trapping Rain Water Hard 40p Two pointers hoặc stack
T6 Review lại bài khó nhất tuần 40p Viết lại không nhìn solution

Tuần 4: Sorting & Binary Search cơ bản

Tối Bài tập Độ khó Thời gian Pattern
T2 Merge Intervals Medium 30p Sort + merge
T3 Binary Search Easy 15p Template chuẩn
T4 Search in Rotated Sorted Array Medium 35p Modified binary search
T5 Find Minimum in Rotated Sorted Array Medium 30p Binary search variant
T6 Weekly Contest trên LeetCode Mix 40p Thi thử, đo progress

Cách giải bài đúng (quy trình 40 phút):

  1. Đọc đề, vẽ ví dụ (5 phút) — Đừng code ngay. Vẽ trên giấy, chạy 2–3 test case bằng tay.
  2. Nghĩ approach (10 phút) — Brute force trước, rồi optimize. Nếu >10p chưa ra hướng → đọc hint.
  3. Code (15 phút) — Viết sạch, đặt tên biến rõ ràng, không viết code rác.
  4. Test + Analyze (10 phút) — Chạy edge cases. Phân tích Time/Space complexity. Ghi chú pattern vào sổ.

Mục tiêu tháng 1: Giải ~20 bài (15 Medium, 5 Easy). Thành thạo HashMap, Two Pointers, Basic Binary Search.


Tháng 2 — Database & Performance + Algo Stack/Queue/Sliding Window

BACKEND TRACK (75 phút/tối)

Tuần 1–2: Database nâng cao

Học gì:

  • Index internals: B-Tree vs LSM-Tree, composite index, covering index, partial index
  • EXPLAIN ANALYZE: đọc execution plan thành thạo
  • Transaction isolation levels, partitioning strategies
  • Connection pooling: PgBouncer, HikariCP

Cách làm đúng (trong 75 phút):

  • Tối 1–3: Đọc DDIA chương 3 (Storage & Retrieval) + thực hành EXPLAIN ANALYZE trên staging DB
  • Tối 4–6: Lấy 10 slow queries từ production log, phân tích & optimize, ghi bảng trước/sau
  • Tối 7–8: Thiết kế partitioning cho 1 bảng lớn (>10M rows)
  • Tối 9–10: Viết runbook xử lý lock/deadlock cho team

Tuần 3–4: Caching & Performance

Học gì:

  • Caching strategies: Cache-Aside, Write-Through, Write-Behind
  • Redis nâng cao: Sorted Set, HyperLogLog, Streams
  • Application profiling, flame graphs, N+1 detection

Cách làm đúng (trong 75 phút):

  • Tối 1–4: Implement cache cho 1 hot API path, đo latency trước/sau
  • Tối 5–7: Viết cache invalidation strategy + load test bằng k6
  • Tối 8–10: Profile endpoint chậm bằng flame graph, fix bottleneck

Deliverable tháng 2:

  • Báo cáo optimization 10 slow queries (metrics trước/sau)
  • Cache layer trên production với monitoring
  • Performance baseline report cho top 5 endpoints

ALGO TRACK — Tháng 2: Stack, Queue, Linked List, Sliding Window (40 phút/tối)

Tại sao: Stack/Queue là nền tảng cho BFS/DFS (tháng 3). Sliding Window giải quyết cực nhiều bài toán substring/subarray.

Tuần 1: Stack

Tối Bài tập Độ khó Pattern
T2 Min Stack Medium Design + auxiliary stack
T3 Evaluate Reverse Polish Notation Medium Stack processing
T4 Daily Temperatures Medium Monotonic stack
T5 Largest Rectangle in Histogram Hard Monotonic stack nâng cao
T6 Review + viết template monotonic stack Tổng hợp pattern

Tuần 2: Queue & Linked List

Tối Bài tập Độ khó Pattern
T2 Reverse Linked List Easy Pointer manipulation
T3 Merge Two Sorted Lists Easy Merge pattern
T4 Linked List Cycle (Floyd's) Easy Fast/Slow pointer
T5 LRU Cache Medium HashMap + Doubly Linked List
T6 Merge K Sorted Lists Hard Heap + merge

Tuần 3: Sliding Window

Tối Bài tập Độ khó Pattern
T2 Maximum Average Subarray I Easy Fixed window
T3 Longest Substring Without Repeating Medium Variable window (ôn lại)
T4 Minimum Window Substring Hard Variable window + HashMap
T5 Permutation in String Medium Fixed window + frequency
T6 Sliding Window Maximum Hard Deque (monotonic queue)

Tuần 4: Tổng hợp + Contest

Tối Bài tập Độ khó Pattern
T2 Next Greater Element I Easy Monotonic stack
T3 Remove Nth Node From End Medium Two pointers on LL
T4 Reorder List Medium Find mid + reverse + merge
T5 Giải lại 3 bài sai nhiều nhất tháng Spaced repetition
T6 Weekly Contest Mix Đo progress

Mục tiêu tháng 2: ~20 bài. Master Monotonic Stack, Sliding Window template, LRU Cache.


Tháng 3 — Distributed Systems + Algo Tree & Graph

BACKEND TRACK (75 phút/tối)

Tuần 1–2: Distributed Systems Fundamentals

Học gì:

  • CAP → PACELC, consensus (Raft), eventual consistency
  • Distributed transactions: 2PC, Saga (Orchestration vs Choreography)
  • Message queues: delivery guarantees (at-least-once, exactly-once)

Cách làm đúng (trong 75 phút):

  • Tối 1–3: Đọc DDIA chương 5–7 (Replication, Partitioning, Transactions)
  • Tối 4–6: Vẽ sequence diagram cho flow phức tạp nhất, đánh dấu failure points
  • Tối 7–10: Implement Saga pattern cho 1 multi-service flow + compensation logic

Tuần 3–4: Reliability Engineering

Học gì:

  • Circuit Breaker, Retry (exponential backoff + jitter), Bulkhead
  • Health checks: liveness vs readiness vs startup probes
  • SLO/SLI/SLA definition

Cách làm đúng (trong 75 phút):

  • Tối 1–4: Thêm Circuit Breaker + retry policy cho external service calls
  • Tối 5–7: Định nghĩa SLO cho 3 services, tạo dashboard
  • Tối 8–10: Viết runbook cho failure scenarios (DB down, cache storm, upstream timeout)

Deliverable tháng 3:

  • Saga pattern implementation cho 1 critical flow
  • Circuit breaker + retry trên production
  • SLO document + monitoring dashboard

ALGO TRACK — Tháng 3: Tree & Graph (40 phút/tối)

Tại sao: Tree & Graph là core của System Design (service dependency graph, database index = B-Tree). Đây cũng là nhóm bài phỏng vấn phổ biến nhất cho senior.

Tuần 1: Binary Tree cơ bản

Tối Bài tập Độ khó Pattern
T2 Invert Binary Tree Easy Recursive DFS
T3 Maximum Depth of Binary Tree Easy DFS/BFS
T4 Same Tree + Subtree of Another Tree Easy Recursive comparison
T5 Binary Tree Level Order Traversal Medium BFS with queue
T6 Validate Binary Search Tree Medium Inorder traversal / range check

Tuần 2: Binary Tree nâng cao

Tối Bài tập Độ khó Pattern
T2 Lowest Common Ancestor of BST Medium BST property
T3 Binary Tree Right Side View Medium BFS, last node per level
T4 Construct Binary Tree from Preorder/Inorder Medium Divide & conquer
T5 Serialize and Deserialize Binary Tree Hard BFS/DFS + encoding
T6 Binary Tree Maximum Path Sum Hard Post-order DFS, global max

Tuần 3: Graph — BFS & DFS

Tối Bài tập Độ khó Pattern
T2 Number of Islands Medium DFS/BFS flood fill
T3 Clone Graph Medium BFS + HashMap
T4 Course Schedule (Topological Sort) Medium Kahn's algorithm / DFS
T5 Pacific Atlantic Water Flow Medium Multi-source BFS/DFS
T6 Word Ladder Hard BFS shortest path

Tuần 4: Graph nâng cao + Trie

Tối Bài tập Độ khó Pattern
T2 Graph Valid Tree Medium Union Find hoặc DFS cycle
T3 Number of Connected Components Medium Union Find
T4 Implement Trie Medium Trie data structure
T5 Word Search II Hard Trie + DFS backtracking
T6 Weekly Contest Mix Đo progress

Mục tiêu tháng 3: ~20 bài. Master Tree traversal (BFS/DFS), Topological Sort, Union Find, Trie.


Tháng 4 — DevOps & Observability + Algo Dynamic Programming

BACKEND TRACK (75 phút/tối)

Tuần 1–2: CI/CD & Infrastructure

Học gì:

  • CI/CD pipeline: build → test → scan → deploy → smoke test → rollback
  • Deployment strategies: Blue-Green, Canary, Rolling Update
  • Docker optimization, Kubernetes essentials (Pod, Deployment, HPA)

Cách làm đúng (trong 75 phút):

  • Tối 1–4: Cải thiện CI pipeline (parallel test, cache, giảm build time >30%)
  • Tối 5–7: Viết Dockerfile tối ưu, scan vulnerability
  • Tối 8–10: Setup canary deployment hoặc tạo Helm chart cho 1 service

Tuần 3–4: Observability

Học gì:

  • Structured logging, OpenTelemetry, distributed tracing
  • Metrics: RED method, USE method
  • Grafana dashboards, actionable alerts

Cách làm đúng (trong 75 phút):

  • Tối 1–4: Implement OpenTelemetry tracing cross 3+ services
  • Tối 5–7: Tạo Grafana dashboard theo RED method
  • Tối 8–10: Review/cleanup alerts, tạo on-call playbook

Deliverable tháng 4:

  • CI/CD pipeline cải thiện (đo build time trước/sau)
  • Distributed tracing cross-service
  • Grafana dashboard + alert playbook

ALGO TRACK — Tháng 4: Dynamic Programming (40 phút/tối)

Tại sao: DP là "boss cuối" của thuật toán. Nếu bạn master DP, bạn có thể giải >70% bài medium/hard. DP cũng train khả năng phân tách bài toán lớn thành subproblems — kỹ năng cốt lõi của senior khi thiết kế hệ thống.

Tuần 1: 1D DP

Tối Bài tập Độ khó Pattern
T2 Climbing Stairs Easy Fibonacci variant
T3 House Robber Medium Take/skip pattern
T4 House Robber II (circular) Medium Circular DP
T5 Longest Increasing Subsequence Medium O(n²) → O(n log n)
T6 Coin Change Medium Unbounded knapsack

Tuần 2: 2D DP

Tối Bài tập Độ khó Pattern
T2 Unique Paths Medium Grid DP
T3 Longest Common Subsequence Medium Two-string DP
T4 Edit Distance Medium Classic 2D DP
T5 0/1 Knapsack (practice) Medium Template knapsack
T6 Target Sum Medium Knapsack variant

Tuần 3: DP on Strings & Intervals

Tối Bài tập Độ khó Pattern
T2 Longest Palindromic Substring Medium Expand center / DP
T3 Palindromic Substrings Medium Count palindromes
T4 Word Break Medium DP + HashSet
T5 Decode Ways Medium 1D DP, tricky edge cases
T6 Partition Equal Subset Sum Medium Subset sum = knapsack

Tuần 4: DP tổng hợp

Tối Bài tập Độ khó Pattern
T2 Maximum Product Subarray Medium Track min & max
T3 Interleaving String Medium 2D DP
T4 Burst Balloons Hard Interval DP
T5 Giải lại 3 bài DP sai nhiều nhất Spaced repetition
T6 Weekly Contest Mix Đo progress

Phương pháp giải DP (framework 40 phút):

  1. Define state (5p): dp[i] hoặc dp[i][j] đại diện cho cái gì?
  2. Transition (10p): dp[i] phụ thuộc vào dp nào trước đó?
  3. Base case (3p): dp[0], dp[1] = ?
  4. Code (15p): Bottom-up trước (dễ debug), top-down nếu cần.
  5. Optimize (7p): Space optimization (2D → 1D nếu chỉ dùng row trước).

Mục tiêu tháng 4: ~20 bài DP. Nhận dạng được DP problem trong <2 phút. Viết được transition formula trước khi code.


Tháng 5 — Security & Testing + Algo Greedy/Backtracking/Advanced

BACKEND TRACK (75 phút/tối)

Tuần 1–2: Security Engineering

Học gì:

  • OWASP Top 10 — cách khai thác và phòng chống
  • OAuth 2.0 (Authorization Code + PKCE), JWT best practices
  • RBAC vs ABAC, secrets management

Cách làm đúng (trong 75 phút):

  • Tối 1–3: Chạy OWASP ZAP scan cho project, liệt kê vulnerabilities
  • Tối 4–6: Fix top 5 vulnerabilities, viết post-mortem
  • Tối 7–10: Review auth flow, tạo threat model, implement rate limiting

Tuần 3–4: Testing Strategy

Học gì:

  • Testing pyramid vs trophy, Testcontainers, Contract testing (Pact)
  • Property-based testing, mutation testing, load testing

Cách làm đúng (trong 75 phút):

  • Tối 1–4: Setup Testcontainers, migrate 10 tests sang integration tests
  • Tối 5–7: Implement contract tests cho 1 cặp producer-consumer
  • Tối 8–10: Load test với realistic traffic pattern, viết report

Deliverable tháng 5:

  • Security audit report + fix PRs
  • Integration test suite với Testcontainers trong CI
  • Load test report

ALGO TRACK — Tháng 5: Greedy, Backtracking, Heap, Advanced (40 phút/tối)

Tuần 1: Greedy

Tối Bài tập Độ khó Pattern
T2 Jump Game Medium Greedy reachability
T3 Jump Game II Medium Greedy BFS
T4 Gas Station Medium Circular greedy
T5 Task Scheduler Medium Greedy + math
T6 Partition Labels Medium Greedy + last index

Tuần 2: Backtracking

Tối Bài tập Độ khó Pattern
T2 Subsets Medium Backtracking template
T3 Permutations Medium Swap / visited array
T4 Combination Sum Medium Backtracking + pruning
T5 N-Queens Hard Constraint backtracking
T6 Sudoku Solver Hard Complete backtracking

Tuần 3: Heap & Intervals

Tối Bài tập Độ khó Pattern
T2 Kth Largest Element Medium QuickSelect / Heap
T3 Find Median from Data Stream Hard Two heaps
T4 Meeting Rooms II Medium Min heap + sort
T5 Non-overlapping Intervals Medium Greedy + sort by end
T6 Insert Interval Medium Interval merge

Tuần 4: Bit Manipulation & Math + Tổng ôn

Tối Bài tập Độ khó Pattern
T2 Single Number Easy XOR
T3 Number of 1 Bits Easy Bit counting
T4 Counting Bits Easy DP + bit
T5 Giải lại bài hard khó nhất 5 tháng Spaced repetition
T6 Weekly Contest Mix Đo progress

Mục tiêu tháng 5: ~20 bài. Backtracking template thuộc lòng. Greedy vs DP: biết khi nào chọn cái nào.


Tháng 6 — Leadership & Tổng Kết + Algo Mock Interview

BACKEND TRACK (75 phút/tối)

Tuần 1–2: Technical Leadership

Học gì:

  • Code review nghệ thuật (review architecture, không chỉ syntax)
  • RFC/Design Doc process
  • Tech debt management, mentoring, estimation

Cách làm đúng (trong 75 phút):

  • Tối 1–4: Viết 1 RFC hoàn chỉnh, xin feedback
  • Tối 5–7: Dẫn dắt tech debt inventory, phân loại theo impact/effort
  • Tối 8–10: Mentor 1 junior/middle + tổ chức knowledge sharing

Tuần 3–4: System Design Practice & Portfolio

Cách làm đúng (trong 75 phút):

  • Tối 1–5: Mock system design (URL shortener, chat, payment, notification, feed)
  • Tối 6–8: Viết technical blog post về bài học lớn nhất 6 tháng
  • Tối 9–10: Tạo portfolio document (liệt kê impact với metrics) + xin feedback 360

Deliverable tháng 6:

  • 1 RFC được team approve
  • 1 buổi tech talk / knowledge sharing
  • Portfolio document với measurable impact
  • Feedback 360 + next action plan

ALGO TRACK — Tháng 6: Tổng Ôn & Mock Interview (40 phút/tối)

Tuần 1–2: Ôn pattern yếu nhất

Dựa trên log 5 tháng, xác định 3 pattern yếu nhất và giải thêm 3–5 bài mỗi pattern.

Tối Hoạt động Ghi chú
T2, T4 Giải lại bài sai từ sổ ghi chú Không nhìn solution, đặt timer
T3, T5 Bài mới từ pattern yếu Focus chất lượng, không số lượng
T6 Mock interview 45p (có timer) 1 Easy (10p) + 1 Medium (20p) + 1 Hard (15p)

Tuần 3–4: Mock Interview thật sự

Tối Hoạt động
T2 Mock interview #1 với bạn/mentor (45p algo + 15p system design)
T3 Review + fix gaps từ mock #1
T4 Mock interview #2
T5 Review + viết cheat sheet các pattern
T6 Mock interview #3 (final)

Mục tiêu tháng 6: Giải 1 Medium trong ≤20 phút. Giải được >50% Hard problems. Tổng cộng ~120 bài trong 6 tháng.