上一页 1 2 3 4 5 6 7 ··· 14 下一页
摘要: 两个单链表交叉只能是Y型,所以可以通过判断最后一个节点是否为同一个节点来判断是否交叉 找出交点:遍历两个链表,记录长度分别为L1和L2,先让长的链表向后移动abs(L1-L2),然后在逐个比较结点,第一个相等的结点即为交点。 阅读全文
posted @ 2017-11-13 13:40 青儿哥哥 阅读(1936) 评论(0) 推荐(0) 编辑
摘要: 还可以使用递归实现 阅读全文
posted @ 2017-11-13 11:07 青儿哥哥 阅读(300) 评论(0) 推荐(0) 编辑
摘要: ICMP协议简介 l ICMP网际控制报文协议,通过它可以知道故障的具体原因和位置。 l 由于IP不是为可靠传输服务设计的,ICMP的目的主要是用于在TCP/IP网络中发送出错和控制消息。 l ICMP的错误报告只能通知出错数据包的源主机,而无法通知从源主机到出错路由中途所的所有路由器。 l ICM 阅读全文
posted @ 2017-11-10 11:24 青儿哥哥 阅读(2267) 评论(0) 推荐(0) 编辑
摘要: SSL协议简介 SSL简介 Secure Socket Layer,为Netscape所研发,用以保障在Internet上数据传输之安全,利用数据加密(Encryption)技术,可确保数据在网络上之传输过程中不会被截取及窃听。只要3.0版本以上之I.E.或Netscape浏览器即可支持SSL。当前 阅读全文
posted @ 2017-11-09 22:09 青儿哥哥 阅读(2190) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; struct node{ int value; struct node *next; }; struct node *head; void insert(struct node * &head,int value) { if(head == NULL) { head = new s... 阅读全文
posted @ 2017-11-04 10:53 青儿哥哥 阅读(347) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; struct node{ int value; struct node *next; }; struct node *head1; struct node *head2; void insert(struct node * &head,int value) { if(head == NULL) {... 阅读全文
posted @ 2017-11-04 10:42 青儿哥哥 阅读(494) 评论(0) 推荐(0) 编辑
摘要: #include #include #include void max(char *str) { char *p = str; int max_len = 0; char *max_start = NULL; while(*p != '\0') { if(*p >= '0' && *p = '0' && *q max_len) ... 阅读全文
posted @ 2017-10-28 22:45 青儿哥哥 阅读(1057) 评论(0) 推荐(0) 编辑
摘要: #include #include #include void reverse(char *value) { int len = strlen(value); char *p = value; char *q = value + len - 1; while(p < q) { *p ^= *q; *q ^= *p; ... 阅读全文
posted @ 2017-10-28 22:19 青儿哥哥 阅读(384) 评论(0) 推荐(0) 编辑
摘要: #include #include #include void combine(char *value,char *result,int m) { if(m == 1) { while(*value != '\0') { printf("%s%c\n",result,*value); val... 阅读全文
posted @ 2017-10-28 18:40 青儿哥哥 阅读(449) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; int is_huiwen(char *value,int low,int high,int len) { if(len == 0 || len == 1) return 1; if(value[low] == valu... 阅读全文
posted @ 2017-10-28 18:17 青儿哥哥 阅读(301) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 14 下一页