Lines Matching refs: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
255 # The total compares needed by list.sort() on the same lists were 8627,
257 # heappop() compares): list.sort() is (unsurprisingly!) more efficient
327 its sort order.
421 # 4 k * lg2(k) - (k/2) final sort of the k most extreme values
502 result.sort()
520 result.sort()
560 result.sort(reverse=True)
578 result.sort(reverse=True)