Question: write a function, def find _ second _ smallest ( pq 2 : PriorityQueue ) - > int: find _ second _ smallest ( )
write a function, def findsecondsmallestpq: PriorityQueue int:
findsecondsmallest function accepts a priority queue of integers. Find and return the second smallest value.
test case:
Create the priority queue shown below, pq
this function should return
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
