Post

Replies

Boosts

Views

Created

Priority queue in Swift
WWDC2021 presentation "Meet the Swift Algorithms and Collections packages" introduced three new collection types. One collection that I am seriously missing in Swift is a priority queue (a heap). The main operations are: Append an element. Return an element with lowest value (defined by < operator on the elements). Check if an element is already in the queue. Remove an element. Is a collection like this available in Swift?
1
0
2.8k
Jun ’21