Given a singly-linked, find out (just give the basic logic) the mid
point of a single linked list in a single parse of the list. Assume
the program would be loaded in read-only memory so no manipulation of
the list is allowed.
--
You received this message because you are subscribed to the Google
maintain two pointer
1) slow pointer : it will point to next node for each iteration (ie
node=node-next)
2) fast pointer : it will point to two ahead node for each iteration ( ie
node=node-next-next)
when fast pointer reaches the end of linked list (NULL), slow pionter will
point to middle of