Structures
The following structures are available globally.
-
A PriorityQueue takes objects to be pushed of any type that implements Comparable. It will pop the objects in the order that they would be sorted. A pop() or a push() can be accomplished in O(lg n) time. It can be specified whether the objects should be popped in ascending or descending order (Max Priority Queue or Min Priority Queue) at the time of initialization.
See moreDeclaration
Swift
public struct PriorityQueue<T> where T : Comparable
View on GitHub
Structures Reference