Lines Matching refs:smallest
25 smallest element is always the root, ``heap[0]``.
30 since Python uses zero-based indexing. (b) Our pop method returns the smallest
35 surprises: ``heap[0]`` is the smallest item, and ``heap.sort()`` maintains the
51 Pop and return the smallest item from the *heap*, maintaining the heap
53 smallest item without popping it, use ``heap[0]``.
57 Push *item* on the heap, then pop and return the smallest item from the
70 Pop and return the smallest item from the *heap*, and also push the new *item*.
95 streams is already sorted (smallest to largest).
116 Return a list with the *n* smallest elements from the dataset defined by
137 pushing all values onto a heap and then popping off the smallest values one at a
232 that ``a[0]`` is always its smallest element.
267 means the smallest scheduled time. When an event schedules other events for