A Chinese-language LeetCode study guide with a curated problem order, illustrated solutions, video explanations, and code in C++, Java, Python, Go and JavaScript.
halfrost/LeetCode-Go
Go solutions to LeetCode problems with a companion Cookbook e-book, covering data structures and algorithms for interview prep.
- Stars
- 33,814
- Forks
- 5,694
- Open issues
- 4
- Last commit
- 12 days ago
What is it?
This repository provides Go solutions to LeetCode problems, organized by problem number with a directory that links each problem to its solution folder. The code follows the Google Golang Style Guide, and the solutions are paired with a companion e-book called LeetCode Cookbook that is available for online reading as a PWA and as an offline PDF.
Beyond the problem solutions, the project includes overview tables covering data structures such as heaps, tries, and trees, and algorithm families such as sorting, dynamic programming, graph theory, and number theory. These tables serve as a reference map of topics for learners working through algorithm material.
The author notes that the solutions aim for full test coverage and runtime results at the top of LeetCode's rankings. The repository is useful for developers preparing for coding interviews who want to compare their Go solutions against worked examples.
Key features
- 01Go solutions for LeetCode problems, indexed by problem number and difficulty.
- 02A companion Cookbook e-book, readable online as a PWA or downloaded as PDF.
- 03Overview tables of data structures and algorithm topics with related problems.
- 04Code written to the Google Golang Style Guide.
- 05Solutions are accompanied by test coverage.
Use cases
- Preparing for Go-based coding interviews by studying worked solutions.
- Checking your own Go solution against a reference implementation.
- Browsing algorithm topics grouped by category before practicing problems.
Topics
FAQ
- What is LeetCode-Go?
- Go solutions to LeetCode problems with a companion Cookbook e-book, covering data structures and algorithms for interview prep. This repository provides Go solutions to LeetCode problems, organized by problem number with a directory that links each problem to its solution folder. The code follows the Google Golang Style Guide, and the solutions are paired with a companion e-book called LeetCode Cookbook that is available for online reading as a PWA and as an offline PDF.
- Is LeetCode-Go free to use? What license does it have?
- LeetCode-Go is open source under the MIT license. Check the license terms before using it in commercial products.
- Is LeetCode-Go still maintained?
- Actively maintained. The last commit to LeetCode-Go was on Oct 12, 2026.
- What can I use LeetCode-Go for?
- Preparing for Go-based coding interviews by studying worked solutions. Checking your own Go solution against a reference implementation. Browsing algorithm topics grouped by category before practicing problems.
- Where can I get LeetCode-Go?
- The source code and installation instructions are on GitHub: https://github.com/halfrost/LeetCode-Go
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Go template library of competitive programming algorithms and data structures, with solutions to Codeforces and LeetCode problems.
A community-maintained collection of algorithms implemented in Python, intended for learning and education.
A volunteer-run, ad-free collection of articles on algorithms and data structures popular in competitive programming, translated and extended from e-maxx.ru.
A Chinese-language algorithm study guide that teaches LeetCode problems through reusable thinking frameworks rather than bare code solutions.
A educational collection of algorithms and data structures implemented in C++17 with no external libraries, spanning math, ML, CS and physics.