题目: Given a linked list, determine if it has a
cycle in it. Follow up: Can you solve it without using extra space?解题思路:
使用快慢指针,快指针每次走两步,慢指针每次走一步...
分类:
其他好文 时间:
2014-05-16 05:19:21
阅读次数:
271
http://acm.hdu.edu.cn/showproblem.php?pid=1558先判断线段相交,然后用并查集合并。 1 #include 2
#include 3 #include 4 #define maxn 20000 5 using namespace std; 6 7 i...
分类:
其他好文 时间:
2014-05-16 05:18:02
阅读次数:
353
题目: Given a linked list, return the node where the
cycle begins. If there is no cycle, returnnull. Follow up: Can you solve it
without using extr...
分类:
其他好文 时间:
2014-05-16 04:50:13
阅读次数:
329
1 #include 2 #include 3 using namespace std; 4
5 int main() 6 { 7 string str=""; 8 string str2=""; 9 char max;10 while
(getline(ci...
分类:
其他好文 时间:
2014-05-15 16:20:41
阅读次数:
258
发送端:#include #include #include using namespace
std;#include #include #include using namespace boost::interprocess;int num =
0;mapped_region *mp_r;void...
分类:
其他好文 时间:
2014-05-15 16:05:06
阅读次数:
258
1.带有html标记内容提交(使用web编辑器):js: cshtml: @using
(Html.BeginForm("Add")) { 标题: ...
分类:
其他好文 时间:
2014-05-15 15:54:44
阅读次数:
255
using System;using System.Data;using
System.Configuration;using System.Web;using System.Web.Security;using
System.Web.UI;using System.Web.UI.WebContro...
分类:
Web程序 时间:
2014-05-14 13:33:33
阅读次数:
510
在学习简单工厂模式之前让我们先看看不用简单工厂模式所带来的不便把,我们以一个四则运算的计算器为例逐步的进行说明问题,首先先看看用面向程序的思想实现计算器的过程using
System;using System.Collections.Generic;using System.Linq;using S...
分类:
其他好文 时间:
2014-05-14 13:00:49
阅读次数:
244
mysql_connect(): Connection using old (pre-4.1.1)
authentication protocol
refused解决方法有如下三种:1、服务器端升级启用secure_auth选项;2、客户端连接时off掉secure_auth,即连接时加上--sec...
分类:
数据库 时间:
2014-05-14 12:42:12
阅读次数:
528
/*题目描述:
给定两个整数A和B,其表示形式是:从个位开始,每三位数用逗号","隔开。现在请计算A+B的结果,并以正常形式输出。 输入:
输入包含多组数据数据,每组数据占一行,由两个整数A和B组成(-10^9 #include using namespace std;int main() {
st...
分类:
其他好文 时间:
2014-05-14 12:38:11
阅读次数:
186