A general Data Structure that can grow/shrink in size.

Operations

  • get(i): Read A[i] for
  • set(i,x): Write A[i] := x for
  • size(): Return number of elements in
  • add(x): Write at the end of if there is space. If is full, double capacity and copy elements before adding