Output of operations using min-priority queue

Report a typo

Consider a min-priority queue that is initially empty. The following operations are performed on it:

offer(10)
offer(5)
offer(20)
poll()
offer(7)
offer(15)
poll()
offer(25)
peek()
offer(1)
poll()

Write down the output of all the above operations on a new line, excluding the operations that don't return any output.

Enter a short text
___

Create a free account to access the full topic