Offline PDF edition of https://books.halfrost.com/leetcode · 网页版的离线 PDF
🇬🇧 English / 🇨🇳 简体中文 — both editions in this release | 本次发布同时提供中英文两版
📦 Downloads · 下载
| File | Language · 语言 | Pages · 页数 | Size · 大小 |
|---|---|---|---|
PDF v1.7.97.pdf |
简体中文 Chinese | 2209 | ~36 MB |
PDF_en v1.7.97.pdf |
English 英文 | 2284 | ~36 MB |
🇬🇧 English
Offline PDF snapshot of the LeetCode Cookbook. The online version is updated
continuously and is still recommended — any errata are fixed there immediately.
✨ What's New
- First English edition! The full book is now available in English
(PDF_en v1.7.97.pdf) alongside the Chinese edition — same 797 solutions,
same structure. - Clickable table of contents in both editions: jump straight to any chapter
or any of the 797 problems. - Fix: repaired an unclosed code block in 492. Construct the Rectangle that
previously broke the rendering of the following content.
📖 Contents
- Chapter 1 — Prologue: data structures, algorithms, time & space complexity
- Chapter 2 — Algorithm Topics: 20 topic indexes (Array, String, Two Pointers,
Linked List, Stack, Tree, DP, Backtracking, DFS/BFS, Binary Search, …) - Chapter 3 — Templates: Segment Tree, Union-Find, LRU/LFU Cache
- Chapter 4 — Solutions: 797 LeetCode problems solved in Go, each with the
problem statement, the idea, and the code — most run at beats 100%.
🔢 Versioning
V<major>.<hundreds>.<tens> — V1.7.97 = major version 1, with 797
solutions (7 hundreds, 97).
🤝 Feedback
Spot a typo or a better solution? Open the matching page on the website, click
Edit, and send a PR. If it helps your prep, a ⭐ is appreciated!
🇨🇳 简体中文
本书的离线 PDF 快照。由于网页版会持续更新,仍推荐阅读在线版,任何勘误都会第一时间在线修复。
✨ 本次更新
- 首次新增英文版! 现在除中文版外,全书也提供英文版(
PDF_en v1.7.97.pdf)
—— 同样 797 道题解,结构一致。 - 可点击目录:中英文两版均支持,点击即可跳转到任意章节或 797 道题中的任意一题。
- 修复:修正了《492. Construct the Rectangle》中一处未闭合的代码块,此前会导致
后续内容渲染错乱。
📖 内容
- 第一章 序章:数据结构、算法、时间与空间复杂度
- 第二章 算法专题:20 个专题索引(Array、String、Two Pointers、Linked List、
Stack、Tree、动态规划、回溯、DFS/BFS、二分查找……) - 第三章 一些模板:线段树、并查集、LRU/LFU Cache
- 第四章 LeetCode 题解:797 道题,Go 语言实现,每题包含题目、解题思路与代码,
大部分 runtime beats 100%。
🔢 版本号说明
V<大版本>.<百位题数>.<十位题数> —— V1.7.97 表示大版本 1,共 797 道题解
(7 个百、97)。
🤝 反馈
发现错别字或更优解法?在网页对应页面点击 Edit 提交 PR 即可。如果本书对你有帮助,
欢迎点个 ⭐!