Given a pointer to the head of a link list write a function that returns 0 if the linked list ends in NULL or 1 if it is a circular linked list. Note that a final node in a circular link list doesn't necessarily point to the first node, but could point to any node in the list.
Part 1) Write a function that solves the problem in O(n^2)
Part 2) Write a function that solves the problem in O(n)
Monday, December 3, 2007
Subscribe to:
Post Comments (Atom)

1 comment:
Hi,
I am Rajesh from SiliconIndia. I am also an avid blogger for a while now and participating actively in Indian blogosphere. I read your blog posting and found them very interesting and informative. We would love to see a copy of your blogs posted here, whenever you are posting it on blogger.com. Here are some of the benefits of posting your blogs here:
We have a strong community of 500,000 Indian professionals
Best blogs of 2008 to be published in a book "SiliconIndia bLoG PrinT"
Best blog to be printed in SliconIndia & SmartTechie magazines each month
Chance to be featured on homepage everyday
We appreciate your community initiative here and in helping build a more powerful India! Also, if you have any ideas or want to volunteer to help for SiliconIndia, we would be more than excited to get your help.
Rajesh
rajesh@siliconindia.com
98867 34775
Post a Comment