gitmyhub

LeetCode-Go

Go ★ 34k updated 8h ago

✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% / LeetCode 题解

A complete collection of LeetCode problem solutions written in Go, with 100% test coverage and an offline-readable companion book explaining the reasoning behind each approach.

GoGo testingGitHub ActionsProgressive Web Appsetup: easycomplexity 2/5

LeetCode-Go is a comprehensive collection of solutions to LeetCode coding challenges, all written in Go (also called Golang). LeetCode is a popular platform where software developers practice algorithmic and data structure problems — the kind commonly asked during technical interviews at companies like Google, Facebook, and Apple. This repository provides worked solutions with 100% test coverage, meaning every solution has been verified by automated tests.

The project organizes solutions by both data structure (arrays, linked lists, trees, hash tables, stacks, etc.) and algorithm type (sorting, dynamic programming, backtracking, graph algorithms, etc.). Beyond raw solutions, the repository also includes a companion digital book called "LeetCode Cookbook" available to read online as a Progressive Web App, meaning you can install it on your phone or tablet like a regular app and read offline. The book covers theoretical foundations alongside the solutions, explaining the reasoning behind each approach.

Someone would use this when preparing for a technical software engineering interview and wanting to study Go-style solutions with well-structured code that follows official Go style guidelines. It is also useful for developers learning Go who want to practice on real problems rather than toy examples. Because all solutions beat 100% of runtimes on the platform at the time of submission, they represent highly optimized implementations.

The tech stack is purely Go, with automated test coverage managed through Go's built-in testing framework. The companion book uses a static site generator deployed automatically via GitHub Actions.

Where it fits