> On 31 Oct 2020, at 11:27, Steven D'Aprano wrote:
>
> On Sat, Oct 31, 2020 at 08:24:04AM +, Barry Scott wrote:
>
>>> On 31 Oct 2020, at 06:35, Steven D'Aprano wrote:
>>>
>>> I think we can promise that:
>>>
>>> * if the mapping on the right has missing keys, no assignments occur;
>>>
heapq module contains all the function to implement a Heap structure,
Main functions required to implement Heap data structure are:
function heappush - to push an element in Heap
function heappop - to pop an element from Heap
for implementing Minheap this functions are present in the module as :
Index heap is essential in efficient implementation of Dijkstra's algorithm,
Prim's algorithm and other variants, I have implemented a concise version at
https://github.com/yutao-li/libheap , I think it would be useful to have it in
stdlib
___
Python-i