Priority queue calling class

we have pass class name inside priority queue but not call bool operator as we usually do with class
So can you plzz tell me how bool operator is called

Hi @prasannabisen , actually the comparator class you are referring ,is a special application of class called as functors (functional objects) so when we pass class inside priority queue we are actually passing a functor . whenever we make a object and pass two arguments it automatically calls the bool operator function

I would suggest you to read this article on functors

In case of any doubt feel free to ask :slight_smile:
If you got the answer then mark your doubt as resolved