|
Data Structures and Algorithms
with Object-Oriented Design Patterns in Python |
The StackAsArray class contains one instance attribute--an array of objects called _array.
In addition, the StackAsArray class inherits the _count
instance attribute from the Container class.
In the array implementation of the stack,
the elements contained in the stack occupy positions
0, 1, ...,
of the array.