# LeetCode-Book **Repository Path**: yuanshanchang/LeetCode-Book ## Basic Information - **Project Name**: LeetCode-Book - **Description**: 《剑指 Offer》 Python, Java, C++ 解题代码,LeetBook《图解算法数据结构》配套代码仓。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-03-30 - **Last Updated**: 2024-10-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # :book: 图解算法数据结构 [![stars](https://img.shields.io/github/stars/krahets/LeetCode-Book?style=social)](https://github.com/krahets/LeetCode-Book) [![forks](https://img.shields.io/github/forks/krahets/LeetCode-Book?style=social)](https://github.com/krahets/LeetCode-Book) [![followers](https://img.shields.io/github/followers/krahets?style=social)](https://github.com/krahets) ![leetcode-tests](https://img.shields.io/badge/LeetCode%20tests-75%20accepted%2C%200%20failed-brightgreen) [![Python](https://img.shields.io/badge/Language-Python3-teal)](https://github.com/krahets/LeetCode-Book/tree/main/python) [![Java](https://img.shields.io/badge/Language-Java-orange)](https://github.com/krahets/LeetCode-Book/tree/main/java) [![C++](https://img.shields.io/badge/Language-C++-blue)](https://github.com/krahets/LeetCode-Book/tree/main/cpp) [](https://leetcode-cn.com/leetbook/detail/illustration-of-algorithm/) LeetBook《图解算法数据结构》面向算法初学者、互联网求职者设计,主要内容包括: ### :green_book: 剑指 Offer 图文题解 - 图文详解 75 道题目,覆盖主要算法知识点,非常适合作为算法学习的 **第一份题库** 。 - 题库活跃于各大互联网公司招聘中,可使笔面试准备事半功倍。 - 致力于行文深入浅出、图文搭配,提供简洁的 **Python3, Java, C++** 解题代码。 - 笔者整理了 **30 天刷题计划**、**题目分类**,让刷题有迹可循。 ### :blue_book: 数据结构与算法专栏 - **基础知识:** 时间复杂度、空间复杂度等算法知识。 - **数据结构:** 数组、栈、队列、字符串、链表、树、图、堆、哈希表。 - **算法专题:** 分治算法、动态规划、搜索与回溯算法、查找算法、贪心算法、排序、位运算、双指针、模拟、数学。 ## :student: 适合人群 - 互联网算法、软件岗位求职者。 - 从零开始接触数据结构与算法的同学。 - 具有一定编程基础,计划系统学习算法的同学。 --- ## :ledger: 算法专栏 ### 「[数据结构](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/50e446/)」 > 建议对数据结构不熟悉的同学,先看这篇熟悉用法。 - 常用数据结构的**分类**和**基本特点**。 - 在算法解题中,数据结构的**常用操作**。 - 在 Python3 , Java , C++ 语言中,各数据结构的**初始化与构建方法**。 ### 「[算法复杂度](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/r84gmi/)」 > 复杂度是算法优劣性的有力评价指标,对于理解算法起着至关重要的作用。 - 什么是时间复杂度、空间复杂度? - 时间复杂度和空间复杂度的**概念定义**、**符号表示**、**常见种类**、**时空权衡**。 - 时间与空间复杂度的**示例题目与解析**。 ### 「[动态规划](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/m5zfc1/)」 > 动态规划是算法重难点,也是笔面试重要考点,需要重点理解与练习。 - 动态规划问题特点,动态规划和分治算法的联系与区别; - 借助例题介绍**重叠子问题**和**最优子结构**分别是什么,以及动态规划是如何解决它们的; - 动态规划的**解题框架**总结; - 动态规划的**练习例题**,从易到难排序; ### 「[排序算法](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/pxal47/)」 > 排序是最经典的算法问题之一,由浅入深的多种算法涵盖多个算法知识点(例如暴力搜索、分治算法、堆数据结构等)。 - 排序算法分类方法,包括稳定性 、就地性 、自适应性; - 排序算法与二分查找、双指针算法之间的关系; - 各主要排序算法的时间复杂度与空间复杂度; --- ## :hourglass: 刷题计划 笔者整理了《剑指 Offer 》刷题计划,核心理念为从易到难、从基础类题目到综合类题目,供希望按照知识点类型顺序刷题的小伙伴们参考。行百里者半九十,坚持一个月刷完,一起加油! | 日程 | 题目 | | :--------: | :------------------------------------------------ | | **Day 1** | **栈与队列(简单)** | | | [剑指 Offer 09. 用两个栈实现队列](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5d3i87/) | | | [剑指 Offer 30. 包含 min 函数的栈](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/50bp33/) | | **Day 2** | **链表(简单)** | | | [剑指 Offer 06. 从尾到头打印链表](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5dt66m/) | | | [剑指 Offer 24. 反转链表](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/9pdjbm/) | | | [剑指 Offer 35. 复杂链表的复制](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/9p0yy1/) | | **Day 3** | **字符串(简单)** | | | [剑指 Offer 05. 替换空格](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/50ywkd/) | | | [剑指 Offer 58 - II. 左旋转字符串](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/589fz2/) | | **Day 4** | **查找算法(简单)** | | | [剑指 Offer 03. 数组中重复的数字](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/59bjss/) | | | [剑指 Offer 53 - I. 在排序数组中查找数字 I](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5874p1/) | | | [剑指 Offer 53 - II. 0~n-1 中缺失的数字](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/58iqo5/) | | **Day 5** | **查找算法(中等)** | | | [剑指 Offer 04. 二维数组中的查找](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5v76yi/) | | | [剑指 Offer 11. 旋转数组的最小数字](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/50xofm/) | | | [剑指 Offer 50. 第一个只出现一次的字符](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5viisg/) | | **Day 6** | **搜索与回溯算法(简单)** | | | [剑指 Offer 32 - I. 从上到下打印二叉树](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/9ackoe/) | | | [剑指 Offer 32 - II. 从上到下打印二叉树 II](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5vawr3/) | | | [剑指 Offer 32 - III. 从上到下打印二叉树 III](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5vnp91/) | | **Day 7** | **搜索与回溯算法(简单)** | | | [剑指 Offer 26. 树的子结构](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5dshwe/) | | | [剑指 Offer 27. 二叉树的镜像](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/59zt5i/) | | | [剑指 Offer 28. 对称的二叉树](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5d412v/) | | **Day 8** | **动态规划(简单)** | | | [剑指 Offer 10- I. 斐波那契数列](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/50fxu1/) | | | [剑指 Offer 10- II. 青蛙跳台阶问题](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/57hyl5/) | | | [剑指 Offer 63. 股票的最大利润](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/58nn7r/) | | **Day 9** | **动态规划(中等)** | | | [剑指 Offer 42. 连续子数组的最大和](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/59gq9c/) | | | [剑指 Offer 47. 礼物的最大价值](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5vokvr/) | | **Day 10** | **动态规划(中等)** | | | [剑指 Offer 46. 把数字翻译成字符串](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/99wd55/) | | | [剑指 Offer 48. 最长不含重复字符的子字符串](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5dgr0c/) | | **Day 11** | **双指针(简单)** | | | [剑指 Offer 18. 删除链表的节点](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/505fc7/) | | | [剑指 Offer 22. 链表中倒数第 k 个节点](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/58tl52/) | | **Day 12** | **双指针(简单)** | | | [剑指 Offer 25. 合并两个排序的链表](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5vq98s/) | | | [剑指 Offer 52. 两个链表的第一个公共节点](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/oe5os3/) | | **Day 13** | **双指针(简单)** | | | [剑指 Offer 21. 调整数组顺序使奇数位于偶数前面](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5v8a6t/) | | | [剑指 Offer 57. 和为 s 的两个数字](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5832fi/) | | | [剑指 Offer 58 - I. 翻转单词顺序](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/586ecg/) | | **Day 14** | **搜索与回溯算法(中等)** | | | [剑指 Offer 12. 矩阵中的路径](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/58wowd/) | | | [剑指 Offer 13. 机器人的运动范围](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/9h6vo2/) | | **Day 15** | **搜索与回溯算法(中等)** | | | [剑指 Offer 34. 二叉树中和为某一值的路径](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5dy6pt/) | | | [剑指 Offer 36. 二叉搜索树与双向链表](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5dbies/) | | | [剑指 Offer 54. 二叉搜索树的第 k 大节点](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/58df23/) | | **Day 16** | **排序(简单)** | | | [剑指 Offer 45. 把数组排成最小的数](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/59ypcj/) | | | [剑指 Offer 61. 扑克牌中的顺子](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/57mpoj/) | | **Day 17** | **排序(中等)** | | | [剑指 Offer 40. 最小的 k 个数](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/ohvl0d/) | | | [剑指 Offer 41. 数据流中的中位数](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5vd1j2/) | | **Day 18** | **搜索与回溯算法(中等)** | | | [剑指 Offer 55 - I. 二叉树的深度](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/9hgr5i/) | | | [剑指 Offer 55 - II. 平衡二叉树](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/9hzffg/) | | **Day 19** | **搜索与回溯算法(中等)** | | | [剑指 Offer 64. 求 1 + 2 + … + n](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/9h44cj/) | | | [剑指 Offer 68 - I. 二叉搜索树的最近公共祖先](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/575kd2/) | | | [剑指 Offer 68 - II. 二叉树的最近公共祖先](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/57euni/) | | **Day 20** | **分治算法(中等)** | | | [剑指 Offer 07. 重建二叉树](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/99lxci/) | | | [剑指 Offer 16. 数值的整数次方](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/57rwmg/) | | | [剑指 Offer 33. 二叉搜索树的后序遍历序列](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5vwxx5/) | | **Day 21** | **位运算(简单)** | | | [剑指 Offer 15. 二进制中 1 的个数](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5vk1l3/) | | | [剑指 Offer 65. 不用加减乘除做加法](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5vz6d1/) | | **Day 22** | **位运算(中等)** | | | [剑指 Offer 56 - I. 数组中数字出现的次数](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/eubbnm/) | | | [剑指 Offer 56 - II. 数组中数字出现的次数 II](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/9hyq1r/) | | **Day 23** | **数学(简单)** | | | [剑指 Offer 39. 数组中出现次数超过一半的数字](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/99iy4g/) | | | [剑指 Offer 66. 构建乘积数组](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/57d8cm/) | | **Day 24** | **数学(中等)** | | | [剑指 Offer 14- I. 剪绳子](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5v1026/) | | | [剑指 Offer 57 - II. 和为 s 的连续正数序列](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/eufzm7/) | | | [剑指 Offer 62. 圆圈中最后剩下的数字](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/oxrkot/) | | **Day 25** | **模拟(中等)** | | | [剑指 Offer 29. 顺时针打印矩阵](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5vfh9g/) | | | [剑指 Offer 31. 栈的压入、弹出序列](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5wh1hj/) | | **Day 26** | **字符串(中等)** | | | [剑指 Offer 20. 表示数值的字符串](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5d6vi6/) | | | [剑指 Offer 67. 把字符串转换成整数](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/58pq8g/) | | **Day 27** | **栈与队列(困难)** | | | [剑指 Offer 59 - I. 滑动窗口的最大值](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/58o46i/) | | | [剑指 Offer 59 - II. 队列的最大值](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/e2t5ug/) | | **Day 28** | **搜索与回溯算法(困难)** | | | [剑指 Offer 37. 序列化二叉树](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/990pf2/) | | | [剑指 Offer 38. 字符串的排列](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5dfv5h/) | | **Day 29** | **动态规划(困难)** | | | [剑指 Offer 19. 正则表达式匹配](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/9a1ypc/) | | | [剑指 Offer 49. 丑数](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/9h3im5/) | | | [剑指 Offer 60. n 个骰子的点数](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/ozzl1r/) | | **Day 30** | **分治算法(困难)** | | | [剑指 Offer 17. 打印从 1 到最大的 n 位数](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/594wfg/) | | | [剑指 Offer 51. 数组中的逆序对](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/o58jfs/) | | **Day 31** | **数学(困难)** | | | [剑指 Offer 14- II. 剪绳子 II](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/5vcapc/) | | | [剑指 Offer 43. 1~n 整数中 1 出现的次数](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/572jxs/) | | | [剑指 Offer 44. 数字序列中某一位的数字](https://leetcode-cn.com/leetbook/read/illustration-of-algorithm/57vzfh/) | --- 若本书对您有所帮助,麻烦请您点个 Star :star: 啦,谢谢! Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.