
二叉树
Is Anonymous
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
二叉树搜索树的插入、删除、查找【迭代法】
//二叉树节点class Node { data = null left = null right = null constructor(key) { this.data = key; }}//树class Tree { root = null count = null find(data) { let currentNode = this.root while (current.原创 2022-03-30 17:33:46 · 1191 阅读 · 0 评论 -
前、中、后序遍历
全排列问题对三种遍历都涉及了原创 2021-08-30 14:25:47 · 3159 阅读 · 0 评论 -
数组实现二叉树[回溯]
这里写自定义目录标题// 节点对象function Node( data, left, right, index) { this.data = data; // 节点值 this.left = left || null; // 当前节点的左子节点 this.right = right || null; // 当前节点的右子节点 this.index = index; this.leaf = false; i原创 2021-08-31 20:22:45 · 167 阅读 · 0 评论