Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pop element from heap python

import heapq

H = [21,1,45,78,3,5]
# Create the heap

heapq.heapify(H)
print(H)

# Remove element from the heap
heapq.heappop(H)

print(H)
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #pop #element #heap #python
ADD COMMENT
Topic
Name
8+7 =