Regarding priority queue

sir priority queue for custom class vali video me jo compare class bnayi hai usme kis hisab se compare ho rha hai vo samajh nhi rha means return a.ge<b.age vali line me kiski age return hogi aur if a.age>b.age likha hota to kiski age return hoti

@praveeng1234
if p1.height < p2.height then,
this will return true when second person has greater height. Suppose we have p1.height=5 and p2.height=5.5 then the object which have max height will be at the top(or max priority).

if a.ge>b.age likha hota to kis hisab se priority queue me min se max order tk print ho rha hai

@praveeng1234
see this code https://ide.codingblocks.com/s/359196

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.