features

post Articles

(Articles)

search files, exploits & links sections:

online chat
 server:
   irc.xor.cx
 channel:
   #neworder

random article
HOWTO: Configure VPN Access to a System with One Interface
s0journistMar 3 2005

quotable quotes
Three may keep a secret if two of them are dead.
Benjamin Franklin

List puzzle
@ Out of the box     Oct 29 2009, 15:17 (UTC+0)
data writes: Your friendly 3 letter organization is in the neighborhood hiring mathematicians and computer scientists. One of their interview questions reads as follows:.

Let H be the pointer given to the head of a linked list. Determine whether the given linked list is circular or not. Note: if the list is a circular linked list, the last node of the linked list need not necessarily point to the first node in the linked list; it can point to any other node.

1) Give an algorithm that do this in O(n^2) time
2) Give an algorithm that do this in O(n) time.
Here n is the number of nodes
Discuss Here

For previous puzzle solution
Click Here

read comments (0) / write comment

views: 1877   printer-friendly version

Top of page