最近发布的主题
最近发布的文章
最近分享的资源
- 精彩文章 监控组件系统 at
- 精彩文章 Go并发原理-mpg at
- 精彩文章 进程/线程上下文切换和Golang协程 at
- 精彩文章 分布式事务 at
- 精彩文章 分布式事务 at
最近发布的项目
暂无
最近的评论
-
评论了博文 php cli执行过程 执行管理阶段
-
评论了博文 php cli执行过程  php_module_startup全局只执行一次 php_request_startup请求级别的每次接受新的请求都会执行
-
评论了博文 phpphp原理专题:1、 http://blog.sina.com.cn/s/articlelist_1726042203_1_1.html 2、 https://blog.csdn.net/it_10/category_9545260.html
-
评论了博文 golang 笔记01// 输入单向链表,每隔K个反转一次 func reserveLinkListK(head \*node, k int) *node { if head == nil { return head } var tmpHead *node = head var tmpNode0, tmpNode1 *node var counter int for { if counter % k == 0 { if counter > 0{ tmpHead = tmpNode0 } tmpNode0 = tmpHead.next }else{ if tmpNode0 == nil || tmpNode0.next == nil{ break } tmpNode1 = tmpNode0.next tmpNode0.next = tmpNode1.next tmpNode1.next = tmpHead.next tmpHead.next = tmpNode1 } counter++ } return head }
-
评论了博文 golang 笔记01// 面试中最容易懵逼的题目,看似简单,不自己手写一遍是会懵逼的 type node struct { data int next *node } func Demo0() { var head *node = &node{} var tmpNode *node = head for i := 1; i < 10; i++ { tmpNode.next = &node{data: i} tmpNode = tmpNode.next } ShowList(head) reverseList(head) ShowList(head) } // 打印单链表 func ShowList(head *node) { var tmp *node = head.next for ; tmp != nil; tmp = tmp.next { fmt.Println(tmp.data) } } // 反转单链表 func reverseList(head *node) { var node0 *node = head.next var tmpNode *node for node0.next != nil { tmpNode = node0.next node0.next = tmpNode.next tmpNode.next = head.next head.next = tmpNode } }