TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: SHOT
from: JAN PANTELTJE
date: 2020-03-09 16:18:00
subject: Re: self hosting on the P

On a sunny day (Mon, 9 Mar 2020 10:02:00 +0000) it happened Ahem A Rivet's
Shot  wrote in
:

>On Mon, 09 Mar 2020 07:32:28 GMT
>Jan Panteltje  wrote:
>
>> Nice, I like linked lists.
>
>        All right time to share an ancient hack (that I actually used once).
>
>        You have a single linked list which you wish was a double linked
>list but due to resource limits you can't simply create a double linked
>list and copy the data you have to convert it in place without using any
>extra space. How ? (You may assume the list uses integers as pointers).
>.
>thinking space
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>        Instead of 'next' the pointer field contains 'next xor previous'
>provided you know where you came from 'last' you go to 'last xor pointer'
>to continue in the same direction.


Yes that should work :-)
Never seen that used!

If you jump into the list at some point say using hashing,
then you have a problem though.

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.