What do you mean by stack ? Mention it's characteristic

What do you mean by stack ? Mention it's characteristic and applications in real life

  • C
  • 16 May
  • 11298 Views
  • 6 Answers
Your Answer

STACK
A stack is a heterogeneous data structure which works on the concept of LIFO(Last In, First Out), which means the element inserted in the last, will be the first element to be deleted from the stack. 
There are two operations that can be performed on Stack:
1. PUSH
    Inserting or adding an element into the stack.
2. POP
    Deleting or removing an element from the stack. 
Characterstic
1. The distinguishing characterstic of a stack is that the addition or removal of items take place at the same end. This end is commonly referred to as the "Top of Stack(ToS)".
2. If the stack is full, then no extra element can be inserted into the stack, and this condition is known as "Overflow Condition".
       Let the size of stack be n. 
                            If ToS=n-1, then the condition is overflow condition.
3. If the stack is empty, then no element can be deleted from the stack, and this condition is known as "Underdlow Condition".
                            If ToS<0, then the condition is underflow condition. 

Data Structure

Didn't get the answer.
Contact people of Talent-Data Structure directly by clicking here