Please enable JavaScript.
Coggle requires JavaScript to display documents.
STACK - Coggle Diagram
STACK
5 OPERATION IN A STACK
-
-
o This operation is performed before the item removal operation is executed. If stack is empty there is no item can be removed.
-
- Remove Element from Stack (pop)
-
-
- Add Element to Stack (push)
-
o The prerequisite is that the stack must no be full (for array implementation only) to avoid stack overflow
o A stack overflow can occur if the “stack top” is at maximum size, while the program want to add more item
-
-
DEFINE STACK
• A stack is a data structure in that consist of homogenous (element of the same type) element in which the element are:
-
-
• Because item/node can be added or removed from one end only, which is on the top of the stack, it is also called “Last In First Out (LIFO)” data structure.
-
-
-