# 简介

此项目fork [algorithm-pattern](https://github.com/greyireland/algorithm-pattern)，原repo用go语言实现，这里准备用python实现，用python的小伙伴可以[fork此项目](https://github.com/dataml-cn/algorithm-pattern-python)打卡

算法模板，科学的刷题方式，最快速的刷题路径，让刷题也变得好玩起来, 你值得拥有 🐶\~

![来刷题了](https://img.fuiboom.com/img/title.png)

## 在线文档

在线文档 Gitbook：[算法模板 Python 🔥](https://leetcode.dataml.cn/)

## 心得体会

开始刷题时，确实是无从下手，因为从序号开始刷，刷到几道题就遇到 hard 的题型，会卡住很久，后面去评论区看别人怎么刷题，也去 Google 搜索最好的刷题方式，发现按题型刷题会舒服很多，基本一个类型的题目，一天能做很多，慢慢刷题也不再枯燥，做起来也很有意思。

**问题1** 按什么顺序刷及如何提高效率

> [**算法模板 Python 🔥**](https://leetcode.dataml.cn/) 》 **LeetCode 标签分类** 》 **剑指**
>
> 1. 算法模板，里面的题目是按类型归类，都是一些常见的高频题，很有代表性，大部分都是可以用模板加一点变形做出来，刷完后对大部分题目有基本的认识。
>
>    ![readme\_pattern\_quiz](https://278028978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MbUCQRaFgca0PTun0To%2Fsync%2F6aac1010973987e0acf077f7477f890ff2edae0f.png?generation=1624636964751715\&alt=media)
> 2. 然后, 刷一遍 LeetCode 标签分类，巩固一下一些基础知识点，总结这些知识点。 ![readme\_pattern\_type](https://278028978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MbUCQRaFgca0PTun0To%2Fsync%2F3f131ec394246af080145ebefb599bb93458a591.png?generation=1624636963880732\&alt=media)
> 3. 最后, 刷一遍 LeetCode 剑指，剑指是常见题目的源头，刷完后，应付常见的题目不在话下。 ![readme\_pattern\_offer](https://278028978-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MbUCQRaFgca0PTun0To%2F-Md2iHb_Xi1hInA1Bjlm%2F-Md2ii1B5qWNC1G9Cv0W%2Freadme_pattern_offer.PNG?alt=media\&token=bdaf41b7-6738-4718-9928-ff8cf73028ad)

**问题2** 到底要刷多少题

> 其实这个取决于你自己的目标，个人感觉大概 200 至 300 题基本就满足大部分人的需要了。刷完这些练习题，基本对数据结构和算法有自己的认识体会。

**问题3** 需要刷多久, 如何安排时间

> 这个要看每天投入的时间，建议前面两部分一个半月 （6 周）时间刷完，最后剑指半个月刷完

**问题4** 文章结构

> 首先, 每个小节给出问题分类, 常见思路介绍
>
> 随后, 典型问题的解析
>
> 最后, 每个小节都有对应的练习题, 有了思路还是需要自己手动写写的，**切勿眼高手低**。

## 算法模板目录

### 入门篇

* [Python 入门](https://leetcode.dataml.cn/ru-men-pian/python)
* [算法快速入门](https://leetcode.dataml.cn/ru-men-pian/quickstart)

### 数据结构篇

* [二叉树](https://leetcode.dataml.cn/shu-ju-jie-gou-pian/binary_tree)
* [链表](https://leetcode.dataml.cn/shu-ju-jie-gou-pian/linked_list)
* [栈和队列](https://leetcode.dataml.cn/shu-ju-jie-gou-pian/stack_queue)
* [二进制](https://leetcode.dataml.cn/shu-ju-jie-gou-pian/binary_op)

### 基础算法篇

* [二分搜索](https://leetcode.dataml.cn/ji-chu-suan-fa-pian/binary_search)
* [排序算法](https://leetcode.dataml.cn/ji-chu-suan-fa-pian/sort)
* [动态规划](https://leetcode.dataml.cn/ji-chu-suan-fa-pian/dp)

### 算法思维

* [递归思维](https://leetcode.dataml.cn/suan-fa-si-wei/recursion)
* [滑动窗口思想](https://leetcode.dataml.cn/suan-fa-si-wei/slide_window)
* [二叉搜索树](https://leetcode.dataml.cn/suan-fa-si-wei/binary_search_tree)
* [回溯法](https://leetcode.dataml.cn/suan-fa-si-wei/backtrack)

## 完成打卡

持续更新中，觉得还可以的话点个 **star** 收藏呀 ⭐️\~

【 Github 】[算法模板⭐️](https://github.com/dataml-cn/algorithm-pattern-python)

【在线文档】[算法模板 Python 🔥](https://leetcode.dataml.cn/)

完成计划之后，可以提交 Pull requests，在下面添加自己的项目仓库，完成自己的算法模板打卡呀\~

| 完成 | 用户                                                | 项目地址                                                                                                                                                     |
| -- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ✅  | [easyui](https://github.com/easyui/)              | [algorithm-pattern-swift(Swift 实现)](https://github.com/easyui/algorithm-pattern-swift),[在线文档 Gitbook](https://zyj.gitbook.io/algorithm-pattern-swift/)   |
| ✅  | [wardseptember](https://github.com/wardseptember) | [notes(Java 实现)](https://github.com/wardseptember/notes)                                                                                                 |
| ✅  | [dashidhy](https://github.com/dashidhy)           | [algorithm-pattern-python(Python 实现)](https://github.com/dashidhy/algorithm-pattern-python)                                                              |
| ✅  | [binzi56](https://github.com/binzi56)             | [algorithm-pattern-c(c++ 实现)](https://github.com/binzi56/algorithm-pattern-c)                                                                            |
| ✅  | [lvseouren](https://github.com/lvseouren)         | [algorithm-study-record(c++ 实现)](https://github.com/lvseouren/algorithm-study-record)                                                                    |
| ✅  | [chienmy](https://github.com/chienmy)             | [algorithm-pattern-java(Java 实现)](https://github.com/chienmy/algorithm-pattern-java), [在线文档 Gitbook](https://chienmy.gitbook.io/algorithm-pattern-java/) |
| ✅  | [ligecarryme](https://github.com/ligecarryme)     | [algorithm-pattern-JavaScript(JS+TS实现)](https://github.com/ligecarryme/algorithm-pattern-JavaScript)                                                     |
