From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,eec376a334ad59ed X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-05 06:55:01 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: hashing Date: 5 May 2002 06:55:01 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0205050555.600470b3@posting.google.com> References: <1b2t8.507$na.19833@news8-gui.server.ntli.net> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1020606901 8979 127.0.0.1 (5 May 2002 13:55:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 5 May 2002 13:55:01 GMT Xref: archiver1.google.com comp.lang.ada:23558 Date: 2002-05-05T13:55:01+00:00 List-Id: "chris.danx" wrote in message news:<1b2t8.507$na.19833@news8-gui.server.ntli.net>... > p.s. does anyone have any uses for circular lists? Tom > Swans Tp5.5 book mentions them, what are they used for? > Just curious... Lots and lots of good uses for circular lists. I regard them as one of the fundamental data strucures for queues. Consider the following. Implement a circular list where the tail of the list points to the head (singly linked). Now point the head pointer to the LAST item on the list, not the FIRST. That way, since the LAST is linked to the FIRST you have immediate access to both and it is easy to remove the head or add to the tail, without needing double links, or a separate pointer to the head and tail. There are many uses, but in the operating systems I wrote for Honeywell, all queues were represented this way (space was very important in those systems which were for machines that by todays standards had small memories -- the large members of the family had 32K bytes of memory, and these were full featured real time executives and time sharing operating systems :-)