{
  "translations" :{
    "en": {
      "sc1": "Assume that there are <i>n</i> elements in the queue. By analogy to the array-based list implementation, we could require that all elements of the queue be stored in the first $n$ positions of the array.",
      "sc2": "If we choose the rear element of the queue to be in position 0, then dequeue operations require only $\\theta(1)$ time because the front element of the queue (the one being removed) is the last element in the array.",
      "sc3": "However, enqueue operations will require $\\theta(n)$ time, because the n elements currently in the queue must each be shifted one position in the array.",
      "sc4": "If instead we chose the rear element of the queue to be in position <code>listsize-1</code>, then an enqueue operation is equivalent to an append operation on a list. This requires only $\\theta(1)$ time.",
      "sc5": "But now, a dequeue operation requires $\\theta(n)$ time, because all of the elements must be shifted down by one position to retain the property that the remaining $n-1$ queue elements reside in the first $n-1$ positions of the array."
    }
  }
}
