Minimum heap implementation for priority queue