DequeType

A Deque is a data structure comprised of two queues. This implementation has a front queue, which is reversed, and a back queue, which is not. Operations at either end of the Deque have the same complexity as operations on the end of either queue.

Three structs conform to the DequeType protocol: Deque, DequeSlice, and ContiguousDeque. These correspond to the standard library array types.

  • The front queue. It is stored in reverse.

    Declaration

    Swift

    var front: Container { get set }
  • The type that represents the queues.

    Declaration

    Swift

    typealias Container : RangeReplaceableCollectionType, MutableSliceable
  • The back queue.

    Declaration

    Swift

    var back : Container { get set }
  • Constructs an empty Deque

    Declaration

    Swift

    init()