
数据结构
凉风慕有信
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Note:五大算法——回溯算法
文章目录Key point回溯算法框架全排列问题代码N皇后问题代码 Key point 解决一个回溯问题,实际上就是一个决策树的遍历过程。 围绕3个问题去展开: 路径:指已经做出的选择 选择列表:当前面临的选择 结束条件:到达决策树底层时,无法再做选择的条件 经典题目 全排列、N皇后问题 回溯算法框架 result = [] def backtrack(路径, 选择列表): if 满足...原创 2020-03-30 22:44:51 · 293 阅读 · 0 评论 -
各类树的定义
1. 树(Tree)的基本概念 1.1 树的定义 A tree is a (possibly non-linear) data structure made up of nodes or vertices and edges without having any cycle. The tree with no nodes is called the null or empty tree. A tr...转载 2019-11-30 17:02:56 · 341 阅读 · 0 评论