Stack ADT Implementation: Static vs Dynamic Representations
Static Representation of a Stack ADT
In which case will we use a static representation of a Stack ADT?
We use this when the size of all the stacks we need in our application is the same. The static representation requires knowing the maximum size at compile time; that is, knowing in advance the number of items that the stacks used in this application will contain.
Pseudostatic Representation of a Stack ADT
When should we use a pseudostatic representation of a Stack ADT?
This is used when it is convenient to utilize stacks of different sizes within a program. In this representation, the maximum size of a stack is not the same for all stacks and is set at runtime when it is created. The user will be asked for the size of the stack at the time of creation,...