Programming Roadmap

LeetCode 学习指南

按主题训练数据结构与算法,记录解法、复杂度与复习节奏。

固定训练循环

课程先学概念 ↓ 自己实现最小版本 ↓ 2 × Easy + 1 × Medium ↓ 写复杂度与选择理由 ↓ 3–7 天后复做 1 题

怎么找题

进入 Problemset 后用 Topics + Difficulty 筛选;本学期不要以 Random / Daily Challenge 为主。

01 · Array / Hash Table
Two Sumhash map;体会 O(n²) → O(n)
Contains Duplicateset membership
Valid Anagramcounting / hash
02 · Stack / Queue
Valid Parenthesesstack 的经典匹配模型
Min StackADT + invariant
Daily Temperaturesmonotonic stack,可选
03 · Recursion / Backtracking
Reverse String可强制写递归版
Subsetsinclude / exclude 搜索树
Permutationschoose / recurse / unchoose
04 · Linked List / Binary Search
Reverse Linked List指针更新顺序
Merge Two Sorted Listslinked structure
Binary Searchinterval invariant
05 · Heap / Sorting
Kth Largest Elementheap / quickselect
Top K Frequenthash + heap / bucket
Merge Intervalssorting + scan
06 · Tree / BST
Maximum Depth树递归基本型
Invert Binary Treetraversal + recursion
Validate BSTBST invariant
07 · Graph
Flood Fillgraph traversal 入门
Number of Islandsconnected components
Course Scheduledirected cycle / topo
08 · Greedy / Dynamic Programming
Jump Gamegreedy
Climbing Stairsrecursion → memo → bottom-up
House Robber1D DP state