Home | History | Annotate | Download | only in Lib

Lines Matching defs:sort

29 without surprises: heap[0] is the smallest item, and heap.sort()
74 By iterating over all items, you get an O(n ln n) sort.
76 A nice feature of this sort is that you can efficiently insert new
77 items while the sort is going on, provided that the inserted items are
93 know that a big sort implies producing "runs" (which are pre-sorted
97 sort produces the longest runs possible. Tournaments are a good way
218 result.sort(reverse=True)
236 result.sort()
290 # The total compares needed by list.sort() on the same lists were 8627,
292 # heappop() compares): list.sort() is (unsurprisingly!) more efficient
479 sort = []
481 sort.append(heappop(heap))
482 print sort