Middle pointer for double linked list.
- From: "Skybuck Flying" <spam@xxxxxxxxxxx>
- Date: Thu, 27 Mar 2008 04:23:08 +0100
Hello,
Little idea:
Keep track of a middle pointer for a double linked list.
Each time two nodes are added on the same side move the middle pointer
accordingly.
Do the same vice versa for removing twice from the same side.
Only problem is when removing nodes twice from the same side for uneven
sides, when only two nodes are left the middle pointer would not be updated
and would keep pointing to a non existing node.
Bye,
Skybuck.
.
- Follow-Ups:
- Re: Middle pointer for double linked list.
- From: Ivan Levashew
- Re: Middle pointer for double linked list.
- From: Maarten Wiltink
- Re: Middle pointer for double linked list.
- Prev by Date: Re: Label with picture
- Next by Date: New to Delphi - Connecting to database using just code
- Previous by thread: Label with picture
- Next by thread: Re: Middle pointer for double linked list.
- Index(es):