算法模板 - 算法(2)
![来刷题了](https://img.fuiboom.com/img/title.png)
978 字
|
5 分钟
Cover Image of the Post
回溯法
回溯法(backtrack)常用于遍历列表所有子集,是 DFS 深度搜索一种,一般用于全排列,穷尽所有可能,遍历的过程实际上是一个决策树的遍历过程。时间复杂度一般 O(N!),它不像动态规划存在重叠子问题可以优化,回溯算法就是纯暴力穷举,复杂度一般都很高。
357 字
|
2 分钟
Cover Image of the Post
二叉搜索树
- 每个节点中的值必须大于(或等于)存储在其左侧子树中的任何值。
239 字
|
1 分钟
Cover Image of the Post
递归
将大问题转化为小问题,通过递归依次解决各个小问题
258 字
|
1 分钟
Cover Image of the Post
滑动窗口
- 1、右指针右移之后窗口数据更新
320 字
|
2 分钟
Cover Image of the Post
二分搜索
给一个有序数组和目标值,找第一次/最后一次/任何一次出现的索引,如果没有出现返回-1
1068 字
|
5 分钟
Cover Image of the Post
动态规划
如题  [triangle](https://leetcode-cn.com/problems/triangle/)
1803 字
|
9 分钟
Cover Image of the Post
排序
用数组表示的完美二叉树 complete binary tree
82 字
|
1 分钟
Cover Image of the Post