Instead of using functors in the code here, can we overload < in car class itself?
Overloading of < instead of Functors in the example
from where you are asking this ? any video or blog please specify…
in the same video where sir is writing the code.
no you cannt do that … its c++ standard implementaion for priority que you have to follow this…
we can do that. I don’t know why you think so. Functors is one of the option. not the only option.
may be you are correct… its good for knowledge but I never found any need or use of these things in competitive since i started…
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.