Priority queue greatest

why do i have to add vector also for using greater in priority queue.

also give the priority queue example for stirng

@Souradeep-Kundu-824545687968212
hello souradeep ,
vector is a type of the internal underlying container object where the elements are stored.

to work with string just replace int with string and rest evrthing will remain same.

pls refer this -> http://www.cplusplus.com/reference/queue/priority_queue/

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.