2. Stack
container
Object
of
is
inserted
can be
removed
principle
LILO
last-in
first-out
follow
derived
operations
push
pop
pushing
poping
3. The Stack abstract Data Type
• push(o) – insert object o at the top the stack.
• pop() – Remove from stack and return the top
object on the stack;
• size() – return the number of objects in the
stack
• isEmpty () – return a boolean indicating if the
stack is empty.
• top() – return the top object on the stack,
without removing it;
4. The Stack abstract Data Type
• top() , pop() - An error occurs if the stack is
empty;
• push () – An error occurs if the stack is full.
5. A simple Array-Based Implementation
• Stack - interface
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
6. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
7. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
8. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
9. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
10. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
11. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
12. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
13. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
14. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
15. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
16. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
17. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
18. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack
19. A simple Array-Based Implementation
https://github.com/samueltcsantos/atal/tree/master/src/edu/ufcg/adt/stack