码迷,mamicode.com
首页 >  
搜索关键字:spoj balnum balanced    ( 1777个结果
SPOJ 375. Query on a tree (树链剖分)
Query on a treeTime Limit:5000msMemory Limit:262144KBThis problem will be judged on SPOJ. Original ID:QTREE64-bit integer IO format:%lld Java class na...
分类:其他好文   时间:2014-11-01 14:47:17    阅读次数:182
SPOJ 104 Highways 最小生成树计数
题目链接:点击打开链接 题意: 给定n个点m条边的无向图,问最小生成树有几个。 思路: 模版 #pragma comment(linker, "/STACK:1024000000,1024000000") #include template inline bool rd(T &ret) { char c; int sgn; if(c=getchar(),c==EOF) ...
分类:其他好文   时间:2014-10-31 11:57:42    阅读次数:169
LeetCode:Balanced Binary Tree
题目描述: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node ...
分类:其他好文   时间:2014-10-30 22:42:12    阅读次数:333
LeetCode:Convert Sorted Array to Binary Search Tree
题目描述: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 思路:采用类似折半查找的方式找到当前根节点,则当前根节点左边的属于它的左子树部分,当前根节点右边的属于它的右子树部分。再采用同样的方法,递归地对当前根节点的左右子树做相同的处理。 ...
分类:其他好文   时间:2014-10-30 19:22:04    阅读次数:197
【LeetCode】Convert Sorted List to Binary Search Tree
Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:其他好文   时间:2014-10-30 10:55:20    阅读次数:151
[LeetCode] Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:其他好文   时间:2014-10-29 14:20:43    阅读次数:157
[leetcode]Balanced Binary Tree
问题描述: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node nev...
分类:其他好文   时间:2014-10-27 21:25:12    阅读次数:193
[Leetcode] Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.Solution:/** * Definition for binary tree * public cl...
分类:其他好文   时间:2014-10-27 06:51:31    阅读次数:137
[Leetcode] Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:其他好文   时间:2014-10-26 14:22:44    阅读次数:183
[SPOJ VLATTICE]Visible Lattice Points 数论 莫比乌斯反演
7001. Visible Lattice Points Problem code: VLATTICE Consider a N*N*N lattice. One corner is at (0,0,0) and the opposite one is at (N,N,N). How many lattice points are visible from co...
分类:其他好文   时间:2014-10-24 11:05:49    阅读次数:294
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!