at 3:00 why did he say round bracket operator must be used,
why round brackets
at 3:00 why did he say round bracket operator must be used,
why round brackets
infact why is the operator function even used for what reason
Hello @Souradeep-Kundu-824545687968212,
The reason to overload round bracket operator is:
The operator overloaded function is used to sort elements in the priority queue.
When should we call this function?
OR when should sort the element?
Whenever, we insert or delete an element from the priority queue i.e.
push() and pop() operation which uses the round brackets.
Thus, using overloading this bracket will automatically call the sorting operation or the comparator.
Hope, this would help.
Give a like if you are satisfied.