1.       Difference between Simple Queue and Circular Queue


Simple Queue

Circular Queue

    Simple Queue is linier arrangement during which insertion operation is performed at one end and deletion operation is performed at another end.
     Circular Queue is linier arrangement during which elements are arranged such first element follows last element.
           There is wastage of memory in Simple Queue.
           There is no wastage of memory in Circular Queue.
 Simple Queue first element doesn't follows last element.
         Circular Queue elements are arranged such first element within the queue follows the last element within the queue.
          Simple Queue sometimes it is possible that even if we have free memory space we can not use that free memory space to insert an element.
           Circular Queue we can use all free memory space to insert an element.
         Simple Queue an overflow condition occurs when the value of REAR is greater then of equal to SIZE-1.
          Circular Queue an overflow condition occurs when the value of FRONT and REAR variable is equal.

Difference


2. Difference between Stack and Queue



Stack

Queue

         Stack is a linear data structure in which insertion and deletion operations are performed at only one end.
        Queue is a linier data structure in which insertion operation is performed at one end and deletion operation is performed at another end.
          In stack the element which is inserted last is first to delete.
           In queue the element which is inserted first is first to delete.
           It is known as LIFO(Last In First Out).
         It is known as FIFO (First In First Out).
          It has only one pointer called TOP.
         It has two pointer called FRONT and REAR.
           There is no wastage of memory.
           There is wastage of memory.

Post a Comment

Please do not enter any spam link in the comment box.

Previous Post Next Post