Heap | in Python | Question 9

Last Updated :
Discuss
Comments

How to get the smallest element from a heap without removing it?

heap[0]

peek_heap(heap)

heap_peak(heap)

heappop(heap)

Tags:
Share your thoughts in the comments