https://www.tutorialspoint.com/python_data_structure/python_heaps.htm
Heap is a special tree structure in which each parent node is less than or equal to its child node. Then it is called a Min Heap. If each parent node is greater than or equal to its child node then it is called a max heap. It is very useful is implementing priority queues where the queue item with higher weightage is given more priority in processing. A detailed discussion on heaps is available in our website here. Please study it first if you are new to head data structure. In this chapter we will see the implementation of heap data structure using python.
No comments:
Post a Comment