Tuesday, September 11, 2007

Detecting Cycle in Link List

This problem has become a standard and cliched question among candidates seeking computer programming jobs. The most common solution is to have two pointers and have them traverse the list at different speeds (normally 1:2) - eventually they will meet if there is a cycle. I had thought about another solution which I sent to a web site which hosts all known solutions to this problem. This website has published my solution and it is available here -

http://ostermiller.org/find_loop_singly_linked_list.html

Search for my name in this link - the solution has been credited to me :-).

10 Comments:

Blogger Unknown said...

This morning I was looking into some datastructure issues ... came across your site ...Piyush ... feels good to see you doing well.

9:38 PM  
Blogger Piyush Srivastava said...

Cannot access your profile Shaila...good to see your comment but I am unable to relate your partial name in the ID to your identity. Are you from OUCE?

1:43 AM  
Blogger Unknown said...

This comment has been removed by the author.

3:43 AM  
Blogger Unknown said...

remember of any of your managers whose name contained the same 6 letters in the beginning ?

3:49 AM  
Anonymous Anonymous said...

No mаtter if ѕome one searches for hіs
essential thing, thuѕ he/she desires to be available that іn detail, thus that thing iѕ maіntained oveг here.


My homepage; click here

11:37 PM  
Anonymous Anonymous said...

Hi every one, here evеry рerson
iѕ sharing these kinds of experience, ѕo it's nice to read this blog, and I used to go to see this webpage daily.

Feel free to visit my site - juicing vegetables

2:42 PM  
Anonymous Anonymous said...

Inсredible! This blog loοks just liκe my old οne!
It's on a totally different topic but it has pretty much the same page layout and design. Excellent choice of colors!

Feel free to surf to my web-site - http://hailshare.com/

11:37 PM  
Anonymous Anonymous said...

Hello just wanted to give you a quick heads up.

The words in your article seem to be running off the screen in Firefox.
I'm not sure if this is a formatting issue or something to do with browser compatibility but I figured I'd post
to let you know. The layout look great though! Hope
you get the issue resolved soon. Cheers

Also visit my webpage Video Games

1:29 AM  
Anonymous Anonymous said...

I do not even know how I ended up here, but I thought this post was great.

I don't know who you are but certainly you're
going to a famous blogger if you aren't already ;) Cheers!

Here is my webpage ... Cosmetic Dentist Glasgow

3:13 PM  
Anonymous Anonymous said...

Ι'm pretty pleased to find this web site. I wanted to thank you for your time just for this fantastic read!! I definitely loved every bit of it and I have you book-marked to see new things in your blog.

Feel free to visit my web site; Homes For Sale El Paso Tx

11:07 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home