[prev] 37 [next]

Static/Dynamic Sequences

Previously we have used an array to implement a stack
  • fixed size collection of heterogeneous elements
  • can be accessed via index or via "moving" pointer
The "fixed size" aspect is a potential problem:
  • how big to make the (dynamic) array?   (big ... just in case)
  • what to do if it fills up?
The rigid sequence is another problems:
  • inserting/deleting an item in middle of array