Skip to content
AlbinMathPublic

About

LeetCode solutions, DSA algorithms, data structures, coding interview problems, and programming solutions in Python, C++, and JavaScript with explanations, complexity analysis, and optimized approaches. Continuously updated.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

LeetCode Solutions & DSA Practice

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.

What You'll Find

  • 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.

Statistics

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.


Recently Solved

# Problem Difficulty Pattern Language Solution
4109 Count Valid Suffix Sorts II Hard Hash Map Python Explanation
4107 Count Valid Suffix Sorts I Medium Hash Map JavaScript Explanation
4105 Repeated String Match II Hard Tree & Graph JavaScript Explanation
4104 Count Valid Substrings II Medium Two Pointers C++ Explanation
4103 Remove Elements by Type and Color Medium Two Pointers Python Explanation
4102 Count Valid Substrings I Medium Sliding Window C++ Explanation
4100 Minimum Cost Path With Even XOR Parity Hard Two Pointers Python Explanation
4098 Minimize the Maximum Value of GCD-Connected Array Medium Two Pointers JavaScript Explanation
4068 Maximize Meeting Earnings with Idle Gaps Hard Dynamic Programming Python Explanation
4067 Longest Subarray With Restricted Pair Sums Medium Array / General Python Explanation
4066 Maximum Equal Adjacent Pairs After at Most One Replacement Medium Hash Map JavaScript Explanation
4065 Rearrange Array by Removing Distinct Values Easy Hash Map Python Explanation
4064 Longest Subarray Divisible by K with At Most One Negation II Hard Array / General Python Explanation
4062 Transform Array Using Pair Operations Medium Stack & Queue Python Explanation
4059 Lexicographically Largest Power Array Hard Two Pointers Python Explanation

Navigation & Topic Hubs

1. By Pattern (Browse All Patterns)

2. By Algorithm (Browse All Algorithms)

3. By Data Structure (Browse All Data Structures)

4. By Difficulty (Browse All Difficulties)

5. By Programming Language (Browse All Languages)

6. By Problem Range (Directory Buckets)


Complete Problem Directory

Browse the full index of all solved problems in All_Problems.md.


Repository Architecture

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

Automation & CI/CD Pipeline

The repository utilizes a two-stage GitHub Actions automation workflow:

  1. Sync LeetCode: Runs on an hourly schedule to sync new LeetCode submissions directly into leetcode/.
  2. 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 comprehensive Explanation.md files, updates metadata/problems.json, refreshes topic hubs, and updates README.md and All_Problems.md.

License & Repository Information

GitHub: AlbinMath/leetcode
Continuously updated as new LeetCode problems are solved.

About

LeetCode solutions, DSA algorithms, data structures, coding interview problems, and programming solutions in Python, C++, and JavaScript with explanations, complexity analysis, and optimized approaches. Continuously updated.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages