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
204 result.sort(reverse=True)
288 # The total compares needed by list.sort() on the same lists were 8627,
290 # heappop() compares): list.sort() is (unsurprisingly!) more efficient
436 sort = []
438 sort.append(heappop(heap))
439 print sort