Skip to main content

Posts

Showing posts from March, 2019

Definition of Stack and its algorithm with working process(data structure)

                  Stack                           A Stack is  an ordered collection of items where the addition of items and the removal of existing items always takes place at the same end. This end is commonly referred to as the “top". * working method of stack :- i> Initially top=-1 ii> By increasing top pointer we can insert element    in the stack. iii> when top=size of stack-1  then stack is full. iv> By decreasing the top pointer we can remove   the   element from stack. v> when top=-1 then the stack is empty. figure shows run time stack * The fundamental operations which are possible on a stack are:-         1. push operation (insertion).    2. pop operation (deletion).    3. peep opetation(extract informat...