A continuously updated collection of LeetCode solutions, algorithm explanations, data structures, and coding interview patterns.
This repository contains solved LeetCode problems with explanations, complexity analysis, and source code. Problems are organized by LeetCode number and grouped by algorithmic pattern, data structure, difficulty, and programming language.
- Comprehensive Explanations: Step-by-step algorithm walkthroughs, key insights, and common pitfalls.
- Multi-Language Solutions: Python, C++, JavaScript, TypeScript, Java, SQL, and more.
-
Complexity Analysis: Explicit Time and Space complexity (
$O(N)$ ,$O(\log N)$ , $O(1)$) for every solution. - Pattern & Topic Indexing: Grouped by Binary Search, Sliding Window, Two Pointers, Hash Maps, Stacks, Trees, Graphs, Dynamic Programming, and SQL.
-
Machine-Readable Metadata: Structured JSON catalog available in
metadata/problems.json.
| Category | Count |
|---|---|
| Total Solved | 2587+ |
| Easy | 669+ |
| Medium | 1270+ |
| Hard | 648+ |
Repository Structure: To prevent GitHub directory truncation (which limits folder listings to 1,000 files), all 2,360+ problems are cleanly partitioned into 500-problem range buckets under
leetcode/(0001-0500/,0501-1000/, etc.). You can browse problems directly through their range buckets or search the full directory in All_Problems.md.
1. By Pattern (Browse All Patterns)
- Hash Map
- Two Pointers
- Sliding Window
- Binary Search
- Dynamic Programming
- Greedy
- Monotonic Stack
- Stack & Queue
- Tree & Graph
- Linked List
- Math & Logic
- Database / SQL
- Backtracking
- Prefix Sum
- Fast & Slow Pointers
2. By Algorithm (Browse All Algorithms)
- Depth-First Search (DFS) / Breadth-First Search (BFS)
- In-Place Array Traversal & Index Mapping
- Modified Binary Search
- Two Pointer Convergence & Scanning
- Complement Lookup / Hash Table Frequency
- Memoization & State Transition
3. By Data Structure (Browse All Data Structures)
4. By Difficulty (Browse All Difficulties)
5. By Programming Language (Browse All Languages)
- Python Solutions
- C++ Solutions
- JavaScript Solutions
- TypeScript Solutions
- Java Solutions
- SQL Solutions
- 0001 - 0500
- 0501 - 1000
- 1001 - 1500
- 1501 - 2000
- 2001 - 2500
- 2501 - 3000
- 3001 - 3500
- 3501 - 4000
- 4001 - 4500
Browse the full index of all solved problems in All_Problems.md.
AlbinMath/leetcode
├── README.md
├── All_Problems.md
├── patterns/ # Categorized pattern hubs
├── algorithms/ # Algorithm index hubs
├── data-structures/ # Data structure index hubs
├── difficulty/ # Easy, Medium, Hard hubs
├── languages/ # Language-specific hubs
├── metadata/ # problems.json dataset
├── scripts/ # Automation scripts
└── leetcode/ # Range-partitioned problem directories
├── README.md # Directory index & navigation
├── 0001-0500/ # Problems 1 - 500
├── 0501-1000/ # Problems 501 - 1000
├── 1001-1500/ # Problems 1001 - 1500
├── 1501-2000/ # Problems 1501 - 2000
├── 2001-2500/ # Problems 2001 - 2500
├── 2501-3000/ # Problems 2501 - 3000
├── 3001-3500/ # Problems 3001 - 3500
├── 3501-4000/ # Problems 3501 - 4000
└── 4001-4500/ # Problems 4001 - 4500
The repository utilizes a two-stage GitHub Actions automation workflow:
- Sync LeetCode: Runs on an hourly schedule to sync new LeetCode submissions directly into
leetcode/. - Generate LeetCode Indexes & Metadata: Triggered automatically upon successful completion of the sync workflow (
workflow_run). It partitions new submissions into range buckets (0001-0500/,0501-1000/, etc.), generates comprehensiveExplanation.mdfiles, updatesmetadata/problems.json, refreshes topic hubs, and updates README.md and All_Problems.md.
GitHub: AlbinMath/leetcode
Continuously updated as new LeetCode problems are solved.