Skip to content

gitmaruneko/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Python Solutions 🐍

個人 LeetCode 刷題記錄專案 - 使用自動化腳本管理和追蹤 Python 解題進度

Language LeetCode License

這個專案記錄我在 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" easy

更新統計資訊

python 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(主要練習語言)

學習資源

Statistics

Difficulty Solved
🟢 Easy 6
🟡 Medium 0
🔴 Hard 0
Total 6

Recent Practice

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

About

leetcode-practice

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages