Linked Lists , Stacks And Queues
Linked Lists: IT IS A LINEAR COLLECTION OF DATA ELEMENTS , CALLED AS NODES POINTING TO THE NEXT NODES BY MEANS OF POINTER.
Stacks : A STACK IS A LINEAR STRUCTURE IMPLEMENTED IN LIFO (LAST IN FIRST OUT )MANNER WHERE INSERTION AND DELETIONS ARE RESTRICTED TO OCCUR ONLY AT ONE END - THAT END IS SATCK'S TOP.
Queues: A QUEUE IS ALSO A LINEAR DYNAMIC STRUCTURE IMPLEMENTED IN FIFO( FIRST IN FIRST OUT) MANNER WHERE INSERTIONS CAN OCCUR AT THE " REAR ' END , AND THE BASIC DELETIONS OCCUR ONLY AT " FRONT" END.
IMPORTANT POINTS
LIFO :
-Means Element last inserted would be the first one to be deleted.
-The Stack is also a DYNAMIC DATA STRUCTURE as it can grow( //with increase in number of elements //) or it can shrink(//with decrease in number of elements //).
FIFO:
-Means elements are deleted in the same order as they are inserted into the queue.
No comments:
Post a Comment