{"owner":"doocs","repo":"leetcode","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to AI coding assistants (Claude Code, Cursor, OpenCode, etc.) when working with code in this repository.\n\n## Repository Overview\n\nThis is [doocs/leetcode](https://github.com/doocs/leetcode) — a large collection of LeetCode, Coding Interviews, and other algorithm problem solutions, each implemented in multiple programming languages (Python, Java, C++, Go, TypeScript, Rust, C#, PHP, JavaScript, Kotlin, Swift, Scala, Ruby, Nim, Shell, SQL).\n\n## Directory Structure\n\n- **`solution/`** — Main LeetCode solutions, organized by problem number ranges (e.g., `0000-0099/`, `0100-0199/`). Each problem has its own directory (e.g., `0000-0099/0001.Two Sum/`) containing:\n    - `README.md` / `README_EN.md` — Chinese/English problem descriptions\n    - `Solution.{py,java,cpp,go,ts,cs,rs,...}` — Solution files in each language\n    - Follow standard LeetCode class-based structure: `class Solution` with the method\n\n- **`lcof/`** — 剑指 Offer (Coding Interviews, 2nd Edition) — problem directories named with Chinese titles\n- **`lcof2/`** — 剑指 Offer 专项突击版 (Coding Interviews, Special Edition)\n- **`lcci/`** — 程序员面试金典 (Cracking the Coding Interview, 6th Edition) — `01.01.Is Unique` format\n- **`lcp/`** — LeetCode Contest Problems\n- **`lcs/`** — LeetCode Contest (separate series)\n- **`basic/`** — Basic algorithm implementations (sorting algorithms like BubbleSort, QuickSort, etc.)\n\n## Development Workflow\n\n### Adding a New Solution\n\n1. Create a new problem directory under the appropriate parent (e.g., `solution/0000-0099/0042.My Problem/`)\n2. Add `Solution.py`, `Solution.java`, `Solution.cpp`, `Solution.go`, `Solution.ts`, `Solution.rs`, `Solution.cs`, etc.\n3. Add `README.md` and `README_EN.md` with problem description and solution explanations\n4. Follow the existing templates in `solution/template.md` for README formatting\n5. All language solutions must implement the same algorithm logic\n\n### Code Formatting\n\nAll code must be formatted before committing. The lint-staged hooks run automatically on pre-commit:\n\n```bash\n# JavaScript/TypeScript/PHP/SQL/Markdown\nnpx prettier --write \"**/*.{js,ts,php,sql,md}\"\n\n# Python\npy -m black -S <file>\n\n# C/C++/Java\nnpx clang-format -i --style=file <file>\n\n# Go\ngofmt -w <file>\n\n# Rust\nrustfmt <file>\n```\n\nOr run the full formatting script:\n\n```bash\npython run_format.py\n```\n\n### Installation\n\n```bash\nnpm install        # Installs dev dependencies and triggers pip install for Python deps\n```\n\n### CI/CD\n\nGitHub Actions automatically run:\n\n- **clang-format** lint on C/C++/Java files\n- **Black** lint on Python files\n- **Prettier** on JS/TS/PHP/SQL/Markdown files\n- **Deploy** workflow for the documentation site\n\n## Solution Patterns\n\n- Python solutions use `List` from typing (imported implicitly by LeetCode environment)\n- Go solutions include `package main` header (added/removed by formatting script)\n- PHP solutions include `<?php` header (added/removed by formatting script)\n- SQL solutions uppercase built-in function names (handled by `run_format.py`)\n- C# solutions contributed by [@kfstorm](https://github.com/kfstorm)\n\n## Key Conventions\n\n- Problem directories follow naming convention: `{NUMBER}.{Problem Name with Spaces}`\n- Each solution file is named `Solution.{ext}` (capital S)\n- README files use special HTML comment markers for templating (e.g., `<!-- problem:start -->`, `<!-- solution:start -->`)\n- Solutions should match the problem's required class/method signature from LeetCode\n"},"files":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to AI coding assistants (Claude Code, Cursor, OpenCode, etc.) when working with code in this repository.\n\n## Repository Overview\n\nThis is [doocs/leetcode](https://github.com/doocs/leetcode) — a large collection of LeetCode, Coding Interviews, and other algorithm problem solutions, each implemented in multiple programming languages (Python, Java, C++, Go, TypeScript, Rust, C#, PHP, JavaScript, Kotlin, Swift, Scala, Ruby, Nim, Shell, SQL).\n\n## Directory Structure\n\n- **`solution/`** — Main LeetCode solutions, organized by problem number ranges (e.g., `0000-0099/`, `0100-0199/`). Each problem has its own directory (e.g., `0000-0099/0001.Two Sum/`) containing:\n    - `README.md` / `README_EN.md` — Chinese/English problem descriptions\n    - `Solution.{py,java,cpp,go,ts,cs,rs,...}` — Solution files in each language\n    - Follow standard LeetCode class-based structure: `class Solution` with the method\n\n- **`lcof/`** — 剑指 Offer (Coding Interviews, 2nd Edition) — problem directories named with Chinese titles\n- **`lcof2/`** — 剑指 Offer 专项突击版 (Coding Interviews, Special Edition)\n- **`lcci/`** — 程序员面试金典 (Cracking the Coding Interview, 6th Edition) — `01.01.Is Unique` format\n- **`lcp/`** — LeetCode Contest Problems\n- **`lcs/`** — LeetCode Contest (separate series)\n- **`basic/`** — Basic algorithm implementations (sorting algorithms like BubbleSort, QuickSort, etc.)\n\n## Development Workflow\n\n### Adding a New Solution\n\n1. Create a new problem directory under the appropriate parent (e.g., `solution/0000-0099/0042.My Problem/`)\n2. Add `Solution.py`, `Solution.java`, `Solution.cpp`, `Solution.go`, `Solution.ts`, `Solution.rs`, `Solution.cs`, etc.\n3. Add `README.md` and `README_EN.md` with problem description and solution explanations\n4. Follow the existing templates in `solution/template.md` for README formatting\n5. All language solutions must implement the same algorithm logic\n\n### Code Formatting\n\nAll code must be formatted before committing. The lint-staged hooks run automatically on pre-commit:\n\n```bash\n# JavaScript/TypeScript/PHP/SQL/Markdown\nnpx prettier --write \"**/*.{js,ts,php,sql,md}\"\n\n# Python\npy -m black -S <file>\n\n# C/C++/Java\nnpx clang-format -i --style=file <file>\n\n# Go\ngofmt -w <file>\n\n# Rust\nrustfmt <file>\n```\n\nOr run the full formatting script:\n\n```bash\npython run_format.py\n```\n\n### Installation\n\n```bash\nnpm install        # Installs dev dependencies and triggers pip install for Python deps\n```\n\n### CI/CD\n\nGitHub Actions automatically run:\n\n- **clang-format** lint on C/C++/Java files\n- **Black** lint on Python files\n- **Prettier** on JS/TS/PHP/SQL/Markdown files\n- **Deploy** workflow for the documentation site\n\n## Solution Patterns\n\n- Python solutions use `List` from typing (imported implicitly by LeetCode environment)\n- Go solutions include `package main` header (added/removed by formatting script)\n- PHP solutions include `<?php` header (added/removed by formatting script)\n- SQL solutions uppercase built-in function names (handled by `run_format.py`)\n- C# solutions contributed by [@kfstorm](https://github.com/kfstorm)\n\n## Key Conventions\n\n- Problem directories follow naming convention: `{NUMBER}.{Problem Name with Spaces}`\n- Each solution file is named `Solution.{ext}` (capital S)\n- README files use special HTML comment markers for templating (e.g., `<!-- problem:start -->`, `<!-- solution:start -->`)\n- Solutions should match the problem's required class/method signature from LeetCode\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# CLAUDE.md\n\nThis file provides guidance to AI coding assistants (Claude Code, Cursor, OpenCode, etc.) when working with code in this repository.\n\n## Repository Overview\n\nThis is [doocs/leetcode](https://github.com/doocs/leetcode) — a large collection of LeetCode, Coding Interviews, and other algorithm problem solutions, each implemented in multiple programming languages (Python, Java, C++, Go, TypeScript, Rust, C#, PHP, JavaScript, Kotlin, Swift, Scala, Ruby, Nim, Shell, SQL).\n\n## Directory Structure\n\n- **`solution/`** — Main LeetCode solutions, organized by problem number ranges (e.g., `0000-0099/`, `0100-0199/`). Each problem has its own directory (e.g., `0000-0099/0001.Two Sum/`) containing:\n    - `README.md` / `README_EN.md` — Chinese/English problem descriptions\n    - `Solution.{py,java,cpp,go,ts,cs,rs,...}` — Solution files in each language\n    - Follow standard LeetCode class-based structure: `class Solution` with the method\n\n- **`lcof/`** — 剑指 Offer (Coding Interviews, 2nd Edition) — problem directories named with Chinese titles\n- **`lcof2/`** — 剑指 Offer 专项突击版 (Coding Interviews, Special Edition)\n- **`lcci/`** — 程序员面试金典 (Cracking the Coding Interview, 6th Edition) — `01.01.Is Unique` format\n- **`lcp/`** — LeetCode Contest Problems\n- **`lcs/`** — LeetCode Contest (separate series)\n- **`basic/`** — Basic algorithm implementations (sorting algorithms like BubbleSort, QuickSort, etc.)\n\n## Development Workflow\n\n### Adding a New Solution\n\n1. Create a new problem directory under the appropriate parent (e.g., `solution/0000-0099/0042.My Problem/`)\n2. Add `Solution.py`, `Solution.java`, `Solution.cpp`, `Solution.go`, `Solution.ts`, `Solution.rs`, `Solution.cs`, etc.\n3. Add `README.md` and `README_EN.md` with problem description and solution explanations\n4. Follow the existing templates in `solution/template.md` for README formatting\n5. All language solutions must implement the same algorithm logic\n\n### Code Formatting\n\nAll code must be formatted before committing. The lint-staged hooks run automatically on pre-commit:\n\n```bash\n# JavaScript/TypeScript/PHP/SQL/Markdown\nnpx prettier --write \"**/*.{js,ts,php,sql,md}\"\n\n# Python\npy -m black -S <file>\n\n# C/C++/Java\nnpx clang-format -i --style=file <file>\n\n# Go\ngofmt -w <file>\n\n# Rust\nrustfmt <file>\n```\n\nOr run the full formatting script:\n\n```bash\npython run_format.py\n```\n\n### Installation\n\n```bash\nnpm install        # Installs dev dependencies and triggers pip install for Python deps\n```\n\n### CI/CD\n\nGitHub Actions automatically run:\n\n- **clang-format** lint on C/C++/Java files\n- **Black** lint on Python files\n- **Prettier** on JS/TS/PHP/SQL/Markdown files\n- **Deploy** workflow for the documentation site\n\n## Solution Patterns\n\n- Python solutions use `List` from typing (imported implicitly by LeetCode environment)\n- Go solutions include `package main` header (added/removed by formatting script)\n- PHP solutions include `<?php` header (added/removed by formatting script)\n- SQL solutions uppercase built-in function names (handled by `run_format.py`)\n- C# solutions contributed by [@kfstorm](https://github.com/kfstorm)\n\n## Key Conventions\n\n- Problem directories follow naming convention: `{NUMBER}.{Problem Name with Spaces}`\n- Each solution file is named `Solution.{ext}` (capital S)\n- README files use special HTML comment markers for templating (e.g., `<!-- problem:start -->`, `<!-- solution:start -->`)\n- Solutions should match the problem's required class/method signature from LeetCode\n","category":"root","tokens":872}]}