explaingit

doocs/leetcode

📈 Trending36,016JavaAudience · developerComplexity · 1/5ActiveLicenseSetup · easy

TLDR

Open-source collection of LeetCode coding interview solutions in multiple languages (Java, Python, C++, Go, TypeScript, Rust, and more), organized by problem with explanations.

Mindmap

mindmap
  root((repo))
    What it does
      LeetCode solutions
      Multiple languages
      Interview prep
      Algorithm patterns
    Content coverage
      Standard problems
      Chinese books
      Contest problems
      Topic guides
    Use cases
      Interview prep
      Algorithm learning
      Language comparison
      Pattern reference
    Tech stack
      Java
      Python
      C++
      Go
      TypeScript
      Rust
    Audience
      Job seekers
      Students
      Engineers

Things people build with this

USE CASE 1

Prepare for technical interviews at major tech companies by studying solutions to real LeetCode problems.

USE CASE 2

Learn how the same algorithm works across different programming languages to deepen your understanding.

USE CASE 3

Reference common algorithm patterns like dynamic programming, binary search, and graph traversal with working code examples.

USE CASE 4

Study problems from Chinese programming interview books and timed LeetCode contests alongside standard problems.

Tech stack

JavaPythonC++GoTypeScriptRust

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice and license text.

In plain English

doocs/leetcode is a massive open-source collection of solutions to coding interview problems, with each problem solved in multiple programming languages. LeetCode is a popular platform that hosts thousands of algorithmic challenges frequently used by companies like Google, Amazon, and Meta when hiring engineers. The challenge for learners is that a single solution in one language is not enough, understanding how the same logic looks in Python versus Java versus Go deepens comprehension. This project provides exactly that: carefully written solutions in Java, Python, C++, Go, TypeScript, Rust, and more. The repository covers not only standard LeetCode problems but also problems from two well-known Chinese programming interview books, as well as a collection of competition problems from timed LeetCode contests. Each solution is organized by problem number and includes a README explaining the approach. The project also has dedicated sections focused on specific topics like JavaScript, database queries, and common algorithm patterns such as dynamic programming, binary search, sliding window, and graph traversal. The README is written primarily in Chinese, with an English version available. The project is maintained as a community effort, with regular updates as new problems are added to LeetCode and new contributors submit solutions. A software engineer preparing for technical interviews, a student learning algorithms, or a developer who wants to see how a particular problem is solved in their preferred language would use this repository. The primary language is Java, but the repo genuinely covers a wide range of languages. No special runtime is needed beyond having the relevant language installed on your machine.

Copy-paste prompts

Prompt 1
Show me the LeetCode solution for problem [number] in Python and explain the approach step by step.
Prompt 2
I'm preparing for interviews at Google. Which LeetCode problems should I focus on, and where can I find solutions in my preferred language?
Prompt 3
Compare how the same LeetCode problem is solved in Java versus Python using this repository.
Prompt 4
Help me understand the dynamic programming pattern by looking at solutions in this LeetCode collection.
Prompt 5
Find the solution to [problem name] in multiple languages and explain the trade-offs between them.
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.