Re: which datastructure for fast sorted insert?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • I V

    Re: which datastructure for fast sorted insert?

    On Sun, 25 May 2008 13:05:31 -0300, Gabriel Genellina wrote:
    Use a list, and the bisect module to keep it sorted:
    That's worth doing if you need the data to be sorted after each insert.
    If the OP just needs the data to be sorted at the end, using a data
    structure with fast inserts (like a set) and then sorting at the end will
    likely be faster.
Working...