
April 13, 2022
6:45 a.m.
Many times when using the heapq lib I had to convert my array to negative values so that it could behave like a max heap. Maybe we should pass in a parameter in the functions to specify if we want a max heap behaviour or a min heap behaviour.