should be called when the object at top changes values . still log n worst case , but it 's at least twice as fast to pq.top . change ; pq.adjusttop ; instead of o = pq.pop ; o.change ; pq.push o ; concode_field_sep int size concode_elem_sep int maxSize concode_elem_sep T[] heap concode_field_sep T pop concode_elem_sep T top concode_elem_sep int size concode_elem_sep void upHeap concode_elem_sep void downHeap concode_elem_sep boolean lessThan concode_elem_sep void clear concode_elem_sep boolean insert concode_elem_sep void initialize concode_elem_sep void put
void function ( ) { downHeap ( ) ; }