Question: write a function, def find _ second _ smallest ( pq 2 : PriorityQueue ) - > int: find _ second _ smallest ( )

write a function, def find_second_smallest(pq2: PriorityQueue)-> int:
find_second_smallest() function accepts a priority queue of integers. Find and return the second smallest value.
test case:
Create the priority queue shown below, pq2=
1
11
234
this function should return 2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!