Lines Matching refs:smallest
24 smallest element is always the root, ``heap[0]``.
29 since Python uses zero-based indexing. (b) Our pop method returns the smallest
34 surprises: ``heap[0]`` is the smallest item, and ``heap.sort()`` maintains the
50 Pop and return the smallest item from the *heap*, maintaining the heap
52 smallest item without popping it, use ``heap[0]``.
57 Push *item* on the heap, then pop and return the smallest item from the
69 Pop and return the smallest item from the *heap*, and also push the new *item*.
94 streams is already sorted (smallest to largest).
105 be sorted from largest to smallest.
122 Return a list with the *n* smallest elements from the dataset defined by
139 pushing all values onto a heap and then popping off the smallest values one at a
244 that ``a[0]`` is always its smallest element.
279 means the smallest scheduled time. When an event schedules other events for