個人 LeetCode 刷題記錄專案 - 使用自動化腳本管理和追蹤 Python 解題進度
這個專案記錄我在 LeetCode 上的練習解題過程,採用極簡化結構設計,專注於 Python 解題。
LeetCode/
├── README.md # 專案說明
├── scripts/ # 自動化腳本
│ ├── create-problem.py # 快速創建題目
│ ├── update-stats.py # 更新統計資訊
│ └── migrate-structure.py # 結構遷移工具
├── templates/ # 代碼模板
│ └── python/ # Python 解題模板
└── problems/ # 題目解答(極簡結構)
├── 00001-two-sum/
│ ├── README.md # 題目描述、元數據、思路分析
│ └── solution-python.py # Python 解法
├── 00020-valid-parentheses/
│ ├── README.md
│ ├── solution-python.py # 主要解法:堆疊
│ └── alt1_counter-python.py # 替代解法:計數器
└── ...
- 🎯 極簡結構:每題只有 README + solution-python.py
- 📊 自動統計:一鍵更新解題進度和分類索引
- 🔧 快速創建:使用腳本秒速建立新題目結構
- 📚 智能管理:YAML frontmatter 整合所有元數據
- 🐍 Python 專精:專注 Python 解題和最佳實踐
python scripts/create-problem.py 283 "Move Zeroes" easypython scripts/update-stats.py- 題目資料夾:
{5位數ID}-{kebab-case題名}- 範例:
00020-valid-parentheses
- 範例:
- 主要解答:
solution-python.py - 替代解法:
alt{編號}_{關鍵詞}-python.py- 範例:
alt1_stack-python.py
- 範例:
- README 包含:YAML frontmatter 元數據 + Markdown 內容
- 一律小寫、kebab-case
- ✅ Easy
- 🟡 Medium
- 🔴 Hard
- 🐍 Python(主要練習語言)
- 📚 Python 練習指南 - Python 解題技巧與模板
- 📊 按難度分類索引 - 題目難度分類
- 🏷️ 按標籤分類索引 - 題目標籤分類
| Difficulty | Solved |
|---|---|
| 🟢 Easy | 6 |
| 🟡 Medium | 0 |
| 🔴 Hard | 0 |
| Total | 6 |
| ID | Problem | Difficulty | Completed Date |
|---|---|---|---|
| 20 | Valid Parentheses | 🟢 Easy | 2026-04-01 |
| 26 | Remove Duplicates from Sorted Array | 🟢 Easy | 2026-04-01 |
| 27 | Remove Element | 🟢 Easy | 2026-04-01 |