dotnet / dotnet/dotnet-api-docs
Clarify what "minimal element" means in PriorityQueue.EnqueueDequeue
Open
area-System.Collections
Pri3
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
### Description
PriorityQueue.EnqueueDequeue() does not return the minimum element in this condition. It returns the last added element.
### Reproduction Steps
` var pq= new PriorityQueue();
pq.Enqueue(5, 0);
var r = pq.EnqueueDequeue(6, 0);`
### Expected behavior
r = 5
### Actual behavior
r = 6
### Regression?
_No response_
### Known Workarounds
_No response_
### Configuration
.NET 6
Windows 11 x64
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.