def fix ( h , i ) : down ( h , i , h . size ( ) ) up ( h , i )
accesing elements in a heap in python
Rearrange the heap after the item at position i got updated .
def fix(h, i):
    """Rearrange the heap after the item at position i got updated."""
    down(h, i, h.size())
    up(h, i)