Topic: Deque complexity
Author: Roman Lechtchinsky <wolfro@cs.tu-berlin.de>
Date: 1997/02/26 Raw View
Hi,
two questions about the complexity of deque operations:
1) In section 23.2.1.1 [lib.deque.cons] the complexity of
template<class InputIterator>
deque( InputIterator first, InputIterator last, const Allocator& )
isn't linear if first and last are input iterators. Why? Can't this can
be done in linear time by creating an empty deque and then push_back'ing
the elements?
2) In section 23.2.1.3 [lib.deque.modifiers] the compexity of inserting
multiple elements into a deque isn't specified. Is this an oversight or
a quality of implementation issue?
Bye
Roman
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]