码迷,mamicode.com
首页 >  
搜索关键字:trees    ( 1351个结果
[LeetCode] 572. Subtree of Another Tree
Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a ...
分类:其他好文   时间:2018-10-14 14:05:13    阅读次数:139
[LeetCode] 872. Leaf-Similar Trees
Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence. For example, in the given t ...
分类:其他好文   时间:2018-10-08 23:17:21    阅读次数:145
[LeetCode&Python] Problem 617. Merge Two Binary Trees
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n ...
分类:编程语言   时间:2018-10-07 14:44:22    阅读次数:133
Codeforces.264E.Roadside Trees(线段树 DP LIS)
"题目链接" $Description$ $Solution$ 为了方便,我们将x坐标左右反转,再将所有高度取反,这样依然是维护从左到右的LIS,但是每次是在右边删除元素。 这样对于在p刚种的树,最多只有9棵树比它高,即它只会转移到这9棵树,除这9棵树外,它可以从1~p 1的任何树转移(其它9棵树除 ...
分类:其他好文   时间:2018-10-04 23:04:26    阅读次数:345
894. All Possible Full Binary Trees
列出所有可能的完全二叉树 ...
分类:其他好文   时间:2018-10-04 17:24:00    阅读次数:178
Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined) F - Uniformly Branched Trees 无根树->有根树+dp
F - Uniformly Branched Trees ...
分类:其他好文   时间:2018-10-04 15:20:21    阅读次数:158
[leetcode]100.Same Tree
题目 Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally id ...
分类:其他好文   时间:2018-10-02 17:39:32    阅读次数:203
1044.Pre-post
题目描述: We are all familiar with pre-order, in-order and post-order traversals of binary trees. A common problem in data structure classes is to find th ...
分类:其他好文   时间:2018-10-02 17:38:26    阅读次数:144
「日常训练」Paths and Trees(Codeforces Round 301 Div.2 E)
题意与分析 代码 ...
分类:其他好文   时间:2018-10-01 00:07:46    阅读次数:155
HDU2841 Visible Trees(容斥原理)
题意 这道题题意就是给出第一象限的n*m个点,求出站在原点可以看见多少个点 (1<=n,m<=1^5) 题解 这个题很仪仗队差不多,不过仪仗队是正方形。 这个是长方形。。。 这题其实就是求互质的数对的对数。 我们,一个一个的枚举i,然后就是求跟i互质的数的个数。 然后这个求跟i互质的数的个数可以用容 ...
分类:其他好文   时间:2018-09-27 22:10:55    阅读次数:144
1351条   上一页 1 ... 19 20 21 22 23 ... 136 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!