码迷,mamicode.com
首页 > 其他好文 > 详细

Cracking the Coding Interview Q2.6

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

标签:blog   http   html   io   htm   amp   

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

标签:blog   http   html   io   htm   amp   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!