z-tree官方文档: http://www.treejs.cn/v3/api.php 1. ztree获取当前选中节点及所有父节点 获得当前选中节点路径,如部门库〉新闻部〉文字稿: 树如下图: var curLocation="";//当前位置 var treeObj = $.fn.zTree.g ...
分类:
其他好文 时间:
2020-05-15 15:29:08
阅读次数:
54
Implement a trie with insert, search, and startsWith methods. Example: Trie trie = new Trie(); trie.insert("apple"); trie.search("apple"); // returns ...
分类:
其他好文 时间:
2020-05-15 09:27:43
阅读次数:
54
Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, ...
分类:
其他好文 时间:
2020-05-15 09:23:28
阅读次数:
56
https://leetcode-cn.com/problems/successor-lcci/ 这个题不是特别难,就是比较绕,按照中序遍历的当前节点的下一个结点分为两种 1.当前节点有右孩子,这种比较简单,直接找到右孩子的最左边的孩子就可以。 2.当前节点没有右孩子,要找到当前节点是父节点的左孩子 ...
分类:
其他好文 时间:
2020-05-14 22:41:44
阅读次数:
77
题目 A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find ...
分类:
其他好文 时间:
2020-05-14 19:42:49
阅读次数:
68
color: #666666; font-size: 16px; line-height: 22px; margin-top: 15px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-cl ...
分类:
Web程序 时间:
2020-05-14 19:41:59
阅读次数:
144
几种软件架构 一.阿里云大数据架构 二.今日头条推荐算法架构 推荐系统,如果用形式化的方式去描述实际上是拟合一个用户对内容满意度的函数,这个函数需要输入三个维度的变量。第一个维度是内容。头条现在已经是一个综合内容平台,图文、视频、UGC小视频、问答、微头条,每种内容有很多自己的特征,需要考虑怎样提取 ...
分类:
其他好文 时间:
2020-05-14 19:00:17
阅读次数:
97
递归实现结构很好记,上来写两递归,递归左子树,递归右子树。 前序遍历,访问节点(打印节点)在两个递归前面——中、左、右; 中序遍历,访问放递归中间——左中右; 后序遍历,先两递归,最后才访问——左、中、右。 1)先序遍历void preorder(BiTree T){ if (T != NULL) ...
分类:
其他好文 时间:
2020-05-14 15:51:55
阅读次数:
66
前端性能优化列表: 1. JS 减少 DOM 操作 预加载 懒加载 tree shaking 防抖,节流 变量缓存 for遍历优先 接口数据懒请求 2. CSS 减少类的层级 硬件加速(3d canvas webgl) 雪碧图 避免使用滤镜 3. html 减少无效标签 4. 整体 减少 http ...
分类:
其他好文 时间:
2020-05-14 13:19:22
阅读次数:
68
给定一个字符串 s,计算具有相同数量0和1的非空(连续)子字符串的数量,并且这些子字符串中的所有0和所有1都是组合在一起的。 重复出现的子串要计算它们出现的次数。 来源:力扣(LeetCode) class Solution { public: int countBinarySubstrings(s ...
分类:
其他好文 时间:
2020-05-14 11:26:04
阅读次数:
58