码迷,mamicode.com
首页 >  
搜索关键字:nodes    ( 4030个结果
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-05-16 23:18:16    阅读次数:360
(求通俗易懂的证法) 过n个有标志顶点的树的数目等于n^(n-2)
最近一段时间是决定好好把算法大体学一遍了。今天发现了一个有趣的定理:cayley’s theorem: 过n个有标志顶点的树的数目等于n^(n-2)。以4个nodes的树为例,应该是16个没错,然后找了好半天也没有找到能看懂的证明过程。如果有哪位有发现比较易懂的证法,欢迎和我在留言讨论。:)
分类:其他好文   时间:2014-05-13 18:25:06    阅读次数:183
【LeetCode】Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:其他好文   时间:2014-05-11 18:15:52    阅读次数:300
Leetcode: Swap Nodes in Pairs
坑爹地多次过,全都是写程序时不注意的小问题,书写习惯还需要进一步改善。遇到的bug有:忘记return语句;定义ListNode runner = head.next,却将判断head==null的情况放在这句之后; 忘记了新的head将不会是原来的那个head,而是head.next;所以以后遇到...
分类:其他好文   时间:2014-05-10 06:59:37    阅读次数:320
hdu 1325 Is It A Tree?
Problem DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by dire...
分类:其他好文   时间:2014-05-10 03:18:52    阅读次数:374
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 uniquely. We use # as a separat...
分类:其他好文   时间:2014-05-09 22:31:35    阅读次数:353
Clustering coefficient [转]
Clustering coefficient的定义有两种;全局的和局部的。全局的算法基于triplet。首先解释triplet。triplet 包含 open triplet 和 closed triplet 两种(A triplet is three nodes that are connecte...
分类:其他好文   时间:2014-05-09 05:28:02    阅读次数:280
leetcode -day11 Clone Graph & Palindrome Partitioning I II
1、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 uniquely. We use # as...
分类:其他好文   时间:2014-05-09 02:17:58    阅读次数:336
CA.sh分析
#viCA.sh看结构:定义两个函数(32-55,57-59*);第二个函数,比较使用啊,可以收藏。第二个函数usage(){echo"usage:$0-newcert|-newreq|-newreq-nodes|-newca|-sign|-verify">&2}最终的效果就是这样(实现见后边);init.d下的脚本常常有,用起来挺好。
分类:其他好文   时间:2014-05-08 17:04:29    阅读次数:253
Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:其他好文   时间:2014-05-07 13:42:51    阅读次数:278
4030条   上一页 1 ... 399 400 401 402 403 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!