Re: hi
- From: "Jirka Klaue" <jklaue@xxxxxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 14:43:32 +0100
Ankit Sharma:
Ganga:
Can anybody tell me how to find out middle node of a link list without traversing all the nodes.
you can find that by using two pointers, fast pointer and slow pointer. Fast pointer will jump two places and at the same time slow pointer will jump one place. When fast pointer reaches the end......
.... it'll have traversed all nodes.
Jirka .