Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. N ...
分类:
其他好文 时间:
2020-04-22 10:01:42
阅读次数:
64
题目 https://leetcode cn.com/problems/validate binary search tree/ 给定一个二叉树,判断其是否是一个有效的二叉搜索树。 假设一个二叉搜索树具有如下特征: 节点的左子树只包含小于当前节点的数。 节点的右子树只包含大于当前节点的数。 所有左子 ...
分类:
编程语言 时间:
2020-04-22 09:39:44
阅读次数:
68
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet ...
分类:
其他好文 时间:
2020-04-22 09:28:17
阅读次数:
63
原文地址:https://blog.csdn.net/growing_tree/article/details/46622579 使用List.contains(Object object)方法判断ArrayList是否包含一个元素对象(针对于对象的属性值相同,但对象地址不同的情况),如果没有重写L ...
分类:
其他好文 时间:
2020-04-22 09:19:46
阅读次数:
293
概述 今天听了尤大 bilibili 直播关于 vue3 的介绍,简要记录一下,供以后参考,希望对其它人也有用。 记录 1.用实例演示了 vue3 在性能上的一些优化,包括:vue3支持tree shaking(react不支持),新的diff算法,runtime缓存等等 2.fragment组件和 ...
分类:
其他好文 时间:
2020-04-22 00:08:31
阅读次数:
173
从系统架构来看,目前的商用服务器大体可以分为三类,即: 对称多处理器结构(SMP:Symmetric Multi-Processor) 非一致存储访问结构(NUMA:Non-Uniform Memory Access) 以及海量并行处理结构(MPP:Massive Parallel Processi ...
分类:
其他好文 时间:
2020-04-21 16:45:17
阅读次数:
80
这题还是挺有意思的。 题目要求的是哈密顿路径,这个有点不好处理,我们先转化成求哈密顿回路后减去一条路径。 1.求回路 这就是个套路题了,我们不考虑每条路径,而考虑每一个边最多被包含在几条路径内。 对于每一个边,如果把它断开后把树分成了两个大小分别为 $x$ 和 $y$ 的连通块,则有 $\min(x ...
分类:
其他好文 时间:
2020-04-21 15:15:12
阅读次数:
64
很久没写红黑树了,这次使用 python 实现了一遍。 class Rbtree(object): """ 红黑树 """ class NodePre(object): """ 定义红黑树节点基本属性 """ _color = {'red': True, 'black': False} def __ ...
分类:
编程语言 时间:
2020-04-21 15:07:56
阅读次数:
55
从前序与中序遍历序列构造二叉树。题意是给一个二叉树的前序遍历和中序遍历,请根据这两个遍历,把树构造出来。例子, For example, given preorder = [3,9,20,15,7] inorder = [9,3,15,20,7] Return the following binar ...
分类:
其他好文 时间:
2020-04-21 13:31:31
阅读次数:
65
Tuning failed, falling back to fixed sampling clock https://www.xilinx.com/support/answers/73079.html 2019.2 Zynq UltraScale+ MPSoC: PetaLinux ZCU106 ...
分类:
其他好文 时间:
2020-04-21 09:51:57
阅读次数:
134