TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: JAN PANTELTJE
from: AHEM A RIVET`S SHOT
date: 2020-03-09 10:02:00
subject: Re: self hosting on the P

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.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:\>WIN                                     | A better way to focus the sun
The computer obeys and wins.                |    licences available see
You lose and Bill collects.                 |    http://www.sohara.org/

--- 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™.