判断单链表是否有环两个指针分别为p1和p2,每循环一次只向前走一步,p2向前走两步,知道p2碰到NULL指针或者两个指针相等则说明有环如果存在,start存放在圆环开始的节点bool
IsLoop(node *head,node *start){node *p1=head,*p2=head;if(h...
分类:
其他好文 时间:
2014-05-10 00:22:22
阅读次数:
272
题目:
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
安装pomelo时发现:错误解释:node-gyp和node的版本不一致,有可能是python版本太低,默认是2.6.6最后更改node版本和python版本node版本是10.2.6python版本是2.7.3再次重新安装无错误
分类:
其他好文 时间:
2014-05-09 21:32:43
阅读次数:
451
BFS。 1 #include 2 #include 3 #include 4
#include 5 using namespace std; 6 7 #define INF 0x3fffffff 8 9 typedef struct
node_st {10 int x, y, ...
分类:
其他好文 时间:
2014-05-09 20:18:48
阅读次数:
339
在UEditor一些版本中,如果粘贴Excell中的内容到编辑器,会粘贴不进去,打开控制台发现JS报错了。
在ueditor.all.js:3048行报如下错误:
Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element': The node provided is invalid....
分类:
其他好文 时间:
2014-05-09 15:16:34
阅读次数:
290
Cox.js 它是在标准原生 JavaScript 基础之上对 JavaScript
使用的扩展Cox.js 可以应用于浏览器环境与Node.js。Cox.js
使用异步加载和面向对象的方式使得开发js程序变成一件很轻松的事情。如何获取Cox.jshttp://git.oschina.net/Joy...
分类:
编程语言 时间:
2014-05-09 13:10:39
阅读次数:
320
转载:http://www.kernelchina.org/node/1050linux的list实现之中有如下东东:#define
list_for_each(pos, head) \ for (pos = (head)->next; prefetch(pos->next),
pos != (h....
分类:
系统相关 时间:
2014-05-09 10:04:38
阅读次数:
323
两次通过,考虑漏了一种情况:input: {1}, 1,
这种情况的output是null,应特殊处理; 同时,另外一个问题是:当要被删除的元素是最后一个元素的时候,我的方法又只能从头找起,不够简洁 1 /** 2 *
Definition for singly-linked list. 3 *.....
分类:
其他好文 时间:
2014-05-09 08:57:45
阅读次数:
278
默认使用软件中心安装node.js,然后参考https://famo.us/install进行安装1.sudo
apt-get install git2.npm install -g yo grunt-cli bower generator-famous
执行后结果报如下错误 使用npm WARN ...
分类:
Web程序 时间:
2014-05-09 08:12:08
阅读次数:
478
AIX5.3InstallOracle10gRAC错误集锦--磁盘I/O故障系统环境:操作系统:AIX5300-09集群软件:CRS10.2.0.1数据库:Oracle10.2.0.1系统架构图本机采用vg并发(VGconcurrent)作为共享的存储故障现象:、当在第一个node(aix211)执行root.sh时,被hang住......查看日志:[root@aix..
分类:
数据库 时间:
2014-05-09 00:55:46
阅读次数:
520