This article defines stack. It also lists basic operations and properties of a stack.
Stacks
Stack
is a type of linear list in which insertion and deletion of an element
takes place at one end. It’s basically work on the principle of LIFO.
Basic Operations on Stack
- Push (Insertion)- Pop (Deletion)
- Top (Returns topmost element of stack)
- IsEmpty (Which returns TRUE if stack is empty)
Properties of Stack
- Insertion or Deletion of new node can be performed at one side of list.
- Top of stack points to last in element.
- Stack is dynamic using linked list and static using array.
- The indexing of particular element of stack depends on the basic list which we have use to implement it.
No comments:
Post a Comment