A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-March/086721.html below:

[Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

[Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncementTerry Reedy tjreedy at udel.edu
Wed Mar 4 17:41:47 CET 2009
Lie Ryan wrote:

> Isn't ordered dictionary essentially also an "always sorted" container? 
> It is always sorted depending on the order of insertion? I can't see any 
> technical reason why the data structure can't accommodate them both. Can 
> you point me to a discussion on this?

Appending an item at the end of a sequence is O(1), no search required. 
  Inserting an item at a random 'sorted' point requires at best an 
O(logN) search.  Insertion itself is O(1) to O(N) depending on the 
structure.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4