我的LeetCode:https://leetcode cn.com/u/ituring/ 我的LeetCode刷题源码[GitHub]:https://github.com/izhoujie/Algorithmcii LeetCode 面试题26. 树的子结构 题目 输入两棵二叉树A和B,判断B是 ...
分类:
其他好文 时间:
2020-05-22 19:41:00
阅读次数:
40
线上的tree报了错,connot read ptoperty 'type' of undefined 后面发现 这里有问题,没有判断条件不满足时返回为空,所以会自己返回undefined,导致报错 const loop = (data) => data.map(item => { if (item ...
分类:
其他好文 时间:
2020-05-22 17:40:00
阅读次数:
54
博客链接: 二叉树的层平均值 题目链接:https://leetcode-cn.com/problems/average-of-levels-in-binary-tree/ 给定一个非空二叉树, 返回一个由每层节点平均值组成的数组. 示例 1: 输入: 3 / \ 9 20 / \ 15 7输出: ...
分类:
其他好文 时间:
2020-05-22 17:15:04
阅读次数:
60
Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, ...
分类:
其他好文 时间:
2020-05-22 13:12:40
阅读次数:
54
``` //row-key 和ref 要必须写 ...... method:{ //筛选 screenclick() { //点击筛选的时候 让筛选出来的数据展开 this.forArr(this.tableList, false); this.getList(); }, // 重置 Resetda... ...
分类:
其他好文 时间:
2020-05-22 12:57:33
阅读次数:
199
地址:https://leetcode-cn.com/problems/n-ary-tree-preorder-traversal/ /** * Definition for a Node. * class Node { * public $val = null; * public $childre ...
分类:
其他好文 时间:
2020-05-22 11:21:44
阅读次数:
44
有时提升一个模型的准确度很困难,尝试所有曾学习过的策略和算法,但模型的正确率并没有改善。 前面介绍的算法中,每种算法都有不同的适用范围,可以把多种机器学习算法组合在一起,这时提高算法准确度的有效方法之一。 接下来介绍如何通过scikit-learn来实现集成算法,包括: 装袋(Bagging)算法: ...
分类:
编程语言 时间:
2020-05-22 09:26:55
阅读次数:
52
MySQL对sum()字段进行条件筛选:having 显示按日期汇总且内数量大于10的记录。 SELECT , count( ) as num FROM tbName GROUP BY date HAVING num 10; 在这里,我们不能用where来筛选超过10的记录,因为表中不存在这样一条记 ...
分类:
数据库 时间:
2020-05-21 19:08:34
阅读次数:
56
问题: 请实现两个函数,分别用来序列化和反序列化二叉树二叉树的序列化是指:把一棵二叉树按照某种遍历方式的结果以某种格式保存为字符串,从而使得内存中建立起来的二叉树可以持久保存。序列化可以基于先序、中序、后序、层序的二叉树遍历方式来进行修改,序列化的结果是一个字符串,序列化时通过 某种符号表示空节点( ...
分类:
其他好文 时间:
2020-05-21 16:33:25
阅读次数:
48
此博客链接:https://www.cnblogs.com/ping2yingshi/p/12931231.html 最小的高度树 题目链接:https://leetcode-cn.com/problems/minimum-height-tree-lcci/submissions/ 给定一个有序整数 ...
分类:
其他好文 时间:
2020-05-21 16:04:58
阅读次数:
45