Store all min element from minHeap
minList = [ ] NEW_LINE while ( len ( minHeap ) > 0 ) : NEW_LINE INDENT minList . append ( minHeap [ 0 ] ) NEW_LINE del minHeap [ 0 ] NEW_LINE DEDENT mindiff = sys . maxsize NEW_LINE