From 8498242302118675703
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,cd1ac2d60a3f06
X-Google-Attributes: gidf78e5,public
From: "Gillmer J. Derge" <gderge1@nycap.rr.com>
Subject: Re: What the deque?!
Date: 2000/06/30
Message-ID: <395B529A.29E993CE@nycap.rr.com>#1/1
X-Deja-AN: 640533112
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
References: <MPG.13c481aa27f926e798970c@news.supernews.com>
X-Accept-Language: en
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 962309435 mail2news:22471 mail2news mail2news.demon.co.uk
Organization: Time Warner Road Runner - Albany NY
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
MIME-Version: 1.0
NNTP-Posting-Date: Thu, 29 Jun 2000 09:42:26 EDT
Newsgroups: comp.std.c++

I don't completely understand your dismissal of queues as a valid example of
the need for a deque structure.  Granted, it is possible to implement the queue
adapter in terms of list instead of its current default, deque.  However,
although the list implementation should be more or less as efficient as deque
from a Big-O computational standpoint, it is likely that a list will require
significantly more memory.

Maybe that's a esoteric consideration these days, but I think it's still a
fairly valid rationale for the deque type.  List is really best for situations
involving constant-time insertion in the middle of the structure.  A queue
doesn't require that, thus a deque is a more suitable data structure.

-----
Gillmer J. Derge

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




