Go solutions to LeetCode problems with a companion Cookbook e-book, covering data structures and algorithms for interview prep.
labuladong/fucking-algorithm
A Chinese-language algorithm study guide that teaches LeetCode problems through reusable thinking frameworks rather than bare code solutions.
- Stars
- 135,955
- Forks
- 23,525
- Open issues
- 0
- Last commit
- 7 days ago
What is it?
This repository is a collection of about 60 original articles by labuladong, organized around LeetCode problems and covering the major problem types and techniques. Each article explains the underlying reasoning and general patterns, such as dynamic programming, backtracking, BFS, and binary search templates, so readers can apply the same approach to new problems instead of memorizing individual solutions.
The content is written in Simplified Chinese and organized as a structured study path, from programming language basics and core data structures such as arrays, linked lists, trees, and graphs, through sorting and brute-force search, to dynamic programming and greedy algorithms. Several topics include interactive visualizations, and a companion Chrome extension, VS Code extension, and JetBrains plugin link LeetCode problems to the corresponding explanations. The full text is also published as an online site with an English version.
Key features
- 01Organizes LeetCode problems by technique, such as sliding window, backtracking, and dynamic programming.
- 02Provides reusable solution frameworks for common problem families like subsequences, knapsack, and binary trees.
- 03Includes interactive visualizations for data structures and recursive processes.
- 04Offers browser and IDE plugins that link LeetCode problems to the matching explanations.
- 05Covers programming language basics in C++, Java, Go, Python, and JavaScript.
Use cases
- Preparing for software engineering technical interviews with a structured study plan.
- Learning algorithmic thinking from the ground up rather than memorizing solutions.
- Reviewing a specific technique, such as monotonic stacks or Dijkstra's algorithm, before solving related problems.
- Practicing LeetCode alongside explanations that reference each problem.
Things to know
- No license is specified in the repository metadata, so reuse terms are unclear.
- The main content is written in Chinese; the English version is hosted separately on labuladong.online.
Topics
FAQ
- What is fucking-algorithm?
- A Chinese-language algorithm study guide that teaches LeetCode problems through reusable thinking frameworks rather than bare code solutions. This repository is a collection of about 60 original articles by labuladong, organized around LeetCode problems and covering the major problem types and techniques. Each article explains the underlying reasoning and general patterns, such as dynamic programming, backtracking, BFS, and binary search templates, so readers can apply the same approach to new problems instead of memorizing individual solutions.
- Is fucking-algorithm free to use? What license does it have?
- fucking-algorithm has no declared license. Its code is public, but without a license you have no explicit permission to reuse it; ask the author before relying on it.
- Is fucking-algorithm still maintained?
- Actively maintained. The last commit to fucking-algorithm was on Oct 18, 2026.
- What can I use fucking-algorithm for?
- Preparing for software engineering technical interviews with a structured study plan. Learning algorithmic thinking from the ground up rather than memorizing solutions. Reviewing a specific technique, such as monotonic stacks or Dijkstra's algorithm, before solving related problems. Practicing LeetCode alongside explanations that reference each problem.
- Where can I get fucking-algorithm?
- The source code and installation instructions are on GitHub: https://github.com/labuladong/fucking-algorithm
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A study guide that groups LeetCode interview questions by reusable solving patterns, with a web app to browse and track them.
A JavaScript collection of classic algorithms and data structures, each with explanations and further reading links.
A Chinese-language LeetCode study guide with a curated problem order, illustrated solutions, video explanations, and code in C++, Java, Python, Go and JavaScript.
A educational collection of algorithms and data structures implemented in C++17 with no external libraries, spanning math, ML, CS and physics.
A collection of classic algorithms and data structures implemented in Go, intended for learning and interview preparation.