码迷,mamicode.com
首页 >  
搜索关键字:binary tree    ( 23211个结果
Tree Partition
题意: 给出一棵点权树,一个树的大小定义为所有点的权值和。问将一棵树分为 $k$ 棵子树,如何分割才能使所有树的大小的最大值最小? "传送门" 分析: 最大值最小化问题,考虑用二分求解,枚举答案。 问题转化为如何分割树来判断当前答案是否满足要求。如果一个子树 $v$ 的权重大于 $mid$,则先选择 ...
分类:其他好文   时间:2020-05-24 11:32:52    阅读次数:51
404. Sum of Left Leaves 404.左叶总和
Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 1 ...
分类:其他好文   时间:2020-05-24 11:27:13    阅读次数:52
LSM设计一个数据库引擎
Log-StructuredMerge-Tree,简称LSM。以Mysql、postgresql为代表的传统RDBMS都是基于b-tree的page-orented存储引擎。现代计算机的最大处理瓶颈在磁盘的读写上,数据存储无法绕开磁盘的读写,纯内存型数据库除外,但由于内存存储的不稳定性,我们一般只将内存型的存储作为缓存系统。为提升数据库系统的写性能,我们发现磁盘的顺序写性能远远大于随机写性能,甚至
分类:数据库   时间:2020-05-24 10:03:35    阅读次数:89
Ubuntu18.04安装jenkins
官网参考指引:https://pkg.jenkins.io/debian stable/ wget q O https://pkg.jenkins.io/debian stable/jenkins.io.key | sudo apt key add deb https://pkg.jenkins.i ...
分类:系统相关   时间:2020-05-24 09:42:07    阅读次数:81
538. Convert BST to Greater Tree 538.将BST转换为更大的树
Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all ...
分类:其他好文   时间:2020-05-24 00:24:06    阅读次数:58
N叉树的后续遍历
此博客链接:https://www.cnblogs.com/ping2yingshi/p/12945132.html N叉树的后续遍历(76min) 题目链接:https://leetcode-cn.com/problems/n-ary-tree-postorder-traversal/ 给定一个 ...
分类:其他好文   时间:2020-05-24 00:20:22    阅读次数:56
【题解】Code+7 教科书般的亵渎
题意: 有一个集合 $S$,初始为空。进行 $m$ 次操作哟,分下列两种: 修改:向集合内添加一个 $[1, n]$ 内的正整数 $h$。 定义 $f(d)$ 为 $[1, d], [d + 1, 2d], [2d + 1, 3d], \ldots$ 这样取,第一次没有在集合内找到对应区间内元素的回 ...
分类:其他好文   时间:2020-05-23 19:56:50    阅读次数:78
Pyinstaller使用
一.基本使用 usage: pyinstaller [-h] [-v] [-D] [-F] [--specpath DIR] [-n NAME] [--add-data <SRC;DEST or SRC:DEST>] [--add-binary <SRC;DEST or SRC:DEST>] [-p ...
分类:其他好文   时间:2020-05-23 16:51:01    阅读次数:70
一个简单版本的 makefile 文件(满足一般功能的使用)
目录结构: github 项目地址:https://github.com/liangzai90/MyExecProject2020/tree/master/makefile_project/ASimpleMakefileProject #可执行文件的名称 NAME=Demo1 #需要包含的头文件目录 ...
分类:其他好文   时间:2020-05-23 16:37:06    阅读次数:58
git Please move or remove them before you can merge. 错误解决方案
合并分支或者git pull命令的时候遇到: Updating 7c9e086..936acacerror: The following untracked working tree files would be overwritten by merge:Common/HFHttpRequest/H ...
分类:其他好文   时间:2020-05-23 14:55:03    阅读次数:150
23211条   上一页 1 ... 97 98 99 100 101 ... 2322 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!