![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetCodes刷题总结
ChenYu1203
stay hungry, stay young!
展开
-
leetcode总结1
Delete Node in a Linked ListSupposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value 3, the linked list should become 1 -> 2 -> 4 after calling your func...转载 2018-03-01 14:59:07 · 99 阅读 · 0 评论 -
leetcode总结2
Linked List CycleGiven a linked list, determine if it has a cycle in it.题目分析:要判断一个链表里面有没有环。首先我们可以思考下如果这里面有环,那么会有以下2中情况:该链表是循环链表和该链表的末尾有一个环。那么,我们可以采用2个指针的方法,一个步长比另一个的指针步长要大,那么如果没有环,当快指针指到最后一个节点的时候,我们可以...原创 2018-03-01 16:10:51 · 86 阅读 · 0 评论