IncredibleThings

导航

2015年3月18日 #

LeetCode-Linked List Cycle II

摘要: 这道题其实是一个数学题,先检测出是不是有环,在有环的情况下slow再走x步(x是环外的节点个数)就可以到达环的开始点。 阅读全文

posted @ 2015-03-18 22:34 IncredibleThings 阅读(134) 评论(0) 推荐(0) 编辑

LeetCode-Linked List Cycle

摘要: runner 问题,注意while循环条件; 阅读全文

posted @ 2015-03-18 06:15 IncredibleThings 阅读(133) 评论(0) 推荐(0) 编辑

LeetCode-Reorder List

摘要: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For e... 阅读全文

posted @ 2015-03-18 03:07 IncredibleThings 阅读(119) 评论(0) 推荐(0) 编辑