首页 > 其他 > 详细

Cracking the Coding Interview Q2.6

时间:2014-07-08 17:29:15      阅读:506      评论:0      收藏:0      [点我收藏+]

Given a circular linked list, implement an algorithm which returns node at the beginning of the loop.

DEFINITION

Circular linked list: A (corrupt) linked list in which a node’s next pointer points to an earlier node, so as to make a loop in the linked list.

EXAMPLE

Input: A -> B -> C -> D -> E -> C [the same C as earlier]

Output: C

 

参考:

http://www.cnblogs.com/jdflyfly/p/3829483.html

http://www.cnblogs.com/jdflyfly/p/3829499.html

Cracking the Coding Interview Q2.6,布布扣,bubuko.com

Cracking the Coding Interview Q2.6

原文:http://www.cnblogs.com/jdflyfly/p/3830697.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!