How can I create Min stl priority_queue? December 12, 2022 by Tarik Use std::greater as the comparison function: std::priority_queue<int, std::vector<int>, std::greater<int> > my_min_heap;