Chapter 7
Stacks


7.3 Implementations of the stack ADT


<1> Array Stack :

  1. Invariant of Stack ADT
    1. used no of items in stack
    2. data[]
  2. Implementation // see page 325-326

<2> Linked List Stack :

  1. Invariant of Stack ADT

    Note :
    there is no need for CAPACITY variable
    on the licked list stack.

  2. Implementation // see page 328-331