A priority queue is used to implement a stack efficiently. Push(C) is implemented as insert 'C'. Pop is implemented as a delete minimum element. For a sequence of operations, the keys chosen are in Strictly decreasing order. How?
Almost same https://gateoverflow.in/2248/gate1997_4-7
64.3k questions
77.9k answers
244k comments
80.0k users