| | | | | |

Deque<> Implementation Plan

  • Circular Array
    • Protected array content_ of size contentSize_
    • Maintain illusion: content_[contentSize_] == content_[0]
  • Relative Indexing
    • Protected integers beg_, end_
    • Element position is relative to beg_
    • Front element is content_[beg_]
    • Back element is content[end_ - 1]
    • Size is end_ - beg_ (modulo contentSize_)
  • Class Bracket Operator
    • Modeled on fsu::Vector
    • Distinguished from Deque Iterator bracket operator

| | Top of Page | 4. Generic Positional Containers and Double Ended Queues - 4 of 10