GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Concepts  >  Data Structures

 Print  |  
Question:  Circular Queue

Answer: What is Circular Queue? Explain with examples.


April 04, 2009 12:46:05 #2
 piyushbeli   Member Since: September 2007    Total Comments: 4 

RE: Circular Queue
 

In a normal Queue when queue becomes full we can not add more items, so
following items are lost.  But in a circular queue when queue becomes full
it will start overwriting the items from beginning so that new items/data won't
waste. It is logical also because it is assumed that if an item is useful it
would have been fetched before queue get full and if it is still there when
queue has reached to it's capacity that means it is not very useful and
overwriting this won't harm.

So circular queue will preserve the useful information.


     

 

Back To Question