Define stacks. Explain various operation of stacks ? 


==> Stacks

  • : A stack is linear Data Sturcture in which items are added (pushed, inserted) and removed(pop, deleted) from one end called top.
  • A stack is a container of objects that are inserted and removed according to the last-in first-out (LIFO) principle.
  • . In the stacks only two operations are allowed: push the item into the stack, and pop the item out of the stack.
  • A stack is a limited access data structure - elements can be added and removed from the stack only at the top. Push adds an item to the top of the stack, pop removes the item from the top. A helpful analogy is to think of a stack of books; you can remove only the top book, also you can add a new book on the top.

==> Stack Operations--

       1. Stack full

       2. Stack empty

       3. Push

       4. Pop

       5. Display

       6. Top of stack

 



Share to whatsapp

More Questions from Data Structures and Algorithms Module 2

Define Recursion. Explain types and requirement of recursion ?


View

Define Tower of Hanoi . Explain algorithm for Tower of Hanoi ? 


View

Explain Algorithm for Enqueue operation  and Algorithm for Dequeue operation using array ? 


View

Define Tower of Hanoi. Explain Problem statement for Tower of Hanoi ? 


View

Explain Conversion to Infix expression to Postfix expression


View

Define Circular Queue. Describe implementation of Circular Queue ? 


View

Define stacks . Explain implementation of stacks ? 


View