C++ priority_queue top()C++ priority_queue top() function is used to get reference of top element from priority queue container. SyntaxConsider priority_queue 'pq' as a priority_queue object. ParameterIt does not take any parameter. Return valueIt returns a reference of the top element of the priority queue. Example 1Output: 8 Next TopicC++ priority_queue |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India