Back to course home
0% completed
Vote For New Content
In modern c++ you can use lambda. You don't need to declare your own functor.
lejafilip
Oct 15, 2024
auto greaterCountCmp = [](auto lhs, auto rhs){return lhs.second > rhs.second;}; std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int>>, decltype(greaterCountCmp)> minHeap;
0
0
Comments
Comments
On this page