Re: True lists in python?
- From: Paul Rubin <no.email@xxxxxxxxxxxxxx>
- Date: Sun, 19 Dec 2010 00:24:48 -0800
Dmitry Groshev <lambdadmitry@xxxxxxxxx> writes:
-I can't find any information about reverse's complexity in python
docs, but it seems that deque is a linked list. Maybe this is the one
I need.
Deques are not linked lists. They're just like regular Python lists
(i.e. resizeable arrays) except they can grow and shrink at both ends
rather than just one. The amortized complexity of an append or pop
operation (at either end) is O(1) but occasionally the list has to
be reallocated, which is O(N).
.
- Follow-Ups:
- Re: True lists in python?
- From: Christian Heimes
- Re: True lists in python?
- References:
- True lists in python?
- From: Dmitry Groshev
- Re: True lists in python?
- From: Vito 'ZeD' De Tullio
- Re: True lists in python?
- From: Dmitry Groshev
- True lists in python?
- Prev by Date: Re: True lists in python?
- Next by Date: Re: If/then style question
- Previous by thread: Re: True lists in python?
- Next by thread: Re: True lists in python?
- Index(es):
Relevant Pages
|