码迷,mamicode.com
首页 >  
搜索关键字:nodes    ( 4030个结果
UVa 10223 - How many nodes ?
题目:气你一个整数n,问多少个节点可以生成n个不同的二叉树。 分析:数论,卡特兰数。根据定义即可。 说明: #include #include using namespace std; long long Cat[100]; int main() { Cat[0] = 1LL; for (int i = 1 ; i < 20 ; ++ i) Cat[i] = Cat[i...
分类:其他好文   时间:2014-10-14 11:54:38    阅读次数:140
Partition List
[leetcode]Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x....
分类:其他好文   时间:2014-10-14 11:44:49    阅读次数:140
Leetcode: Clone Graph
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled u...
分类:其他好文   时间:2014-10-14 08:29:27    阅读次数:270
Maximum Depth of Binary Tree
Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ...
分类:其他好文   时间:2014-10-12 17:54:08    阅读次数:177
leetcode - Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1-...
分类:其他好文   时间:2014-10-12 15:51:58    阅读次数:190
[Leetcode] Clone Graph
Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled uniq...
分类:其他好文   时间:2014-10-12 10:27:37    阅读次数:135
Lowest Common Ancestor of a Binary Tree Part I
456789101112131415161718192021// Return #nodes that matches P or Q in the subtree.int countMatchesPQ(Node *root, Node *p, Node *q) { if (!root) retur....
分类:其他好文   时间:2014-10-12 06:40:37    阅读次数:160
leetcode 链表 Partition List
Partition List  Total Accepted: 19761 Total Submissions: 73252My Submissions Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than ...
分类:其他好文   时间:2014-10-12 01:31:37    阅读次数:317
10G rac 安装报The specified nodes are not clusterable 错误
环境:   oracle clusterware:10.2.0.1   redhat 5.5 在验证完相关配置后,提示RAC安装时,报The specified nodes are not clusterable:排查/etc/hosts和信任关系没有错误的情况下,那么要注意rootpre.sh是否都在任何节点执行了...
分类:其他好文   时间:2014-10-11 18:37:56    阅读次数:241
leetcode dfs Minimum Depth of Binary Tree
Minimum Depth of Binary Tree  Total Accepted: 25609 Total Submissions: 86491My Submissions Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the ...
分类:其他好文   时间:2014-10-11 17:41:25    阅读次数:151
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!