[OT] traversing linked lists (was Re: hi)
- From: "Vladimir S. Oka" <novine@xxxxxxxxxxxxxxx>
- Date: 31 Jan 2006 03:06:41 -0800
Ganga wrote:
> Can anybody tell me how to find out middle node of a link list without
> traversing all the nodes.
Hi to you, too!
1) Please use more informative subject lines than "hi" (try also to
capitalise properly). Something like I changed it to might have been
appropriate.
2) The /method/ of achieving what you ask about is more appropriate to
comp.programming, and is at least slightly off topic here.
3) Once you have a C program that tries to achieve your goal, and you
have questions about how/why it does (not) work, asking here is a good
idea.
4) Your question is not specified well enough. Are you talking about
singly- or doubly-linked lists, or even yet other kind? E.g., an idea
for always knowing the middle element, with absolutly no processing, is
to construct a linked list which grows in two directions from its root,
the root also holding the information about whether to next grow to the
left or to the right. However, I doubt that was what you were asking
for. ;-)
Cheers
Vladimir
.
- References:
- hi
- From: Ganga
- hi
- Prev by Date: hi
- Next by Date: Re: Help! Need to make my own color...
- Previous by thread: hi
- Next by thread: Re: hi
- Index(es):
Relevant Pages
|