sir plz explain for min heap
and heap on user based data type struct or class
i am not clear with functioning of user based data type
like in following snippet
class mycomparison
{
public:
bool operator() (const Cell &lhs, const Cell &rhs) const
{
return (lhs.cost > rhs.cost);
}
};
here heap mei upar konsi value aegi min or more
Heap stl syntax not clear
hello @dakshi
agar > operator use karte hai to heap-> min heap ki tarah behave karta hai .
otherwise max heap ki tarah.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.