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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f32236e7e55b02e0 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: Ada Queue Date: 2000/04/07 Message-ID: <8ckrt6$nas$1@nnrp1.deja.com>#1/1 X-Deja-AN: 607903985 References: <38eca724@news.hamilton.edu> <20000406215553.00917.00000166@ng-dh1.aol.com> X-Http-Proxy: 1.0 x37.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Fri Apr 07 14:38:32 2000 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (WinNT; I) Date: 2000-04-07T00:00:00+00:00 List-Id: In article <20000406215553.00917.00000166@ng-dh1.aol.com>, maggiejohn@aol.com (MaggieJohn) wrote: > Also - add new nodes to the head of the queue. You don't want to > walk the queue every time you add a node. Then you've to to walk the queue every time you *remove* a node. It's really 6 of one, half a donzen of another. Of course you can avoid the problem by making a "Queue" a record containg pointers to the head and tail objects. But not with this algorithm. -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/ Before you buy.