Queue

public class Queue<Element> where Element : Equatable

Queue data structures

  • All the elements inside the Queue

    Declaration

    Swift

    public var allElements: [Element] { get }
  • Enqueues new element at the end of the queue

    Declaration

    Swift

    public func enqueue(_ element: Element)

    Parameters

    element

    <#element description#>

  • Dequeues first element from the Queueu

    Declaration

    Swift

    @discardableResult
    public func dequeue() -> Bool

    Return Value

    Boolean result, indicating whether dequeue operation succeeded or failed