First time here? Checkout the FAQ!
+1 vote
Which of the following data structure may give overflow error, even though the current number of element in it is less than its size ?

(A) Simple Queue

(B) Circular Queue

(C) Stack

(D) None of these
asked ago in DS by (477 points)   | 43 views
simple queue

Both A and B.

In circular queue, if we insert n elements then Rear = Front represents both empty queue and Completely full queue. To avoid ambiguity we declare circular queue full after inserting only N - 1 elements.

1 Answer

0 votes

Simple Queue

As we know the overflow condition of simple queue is 

If (REAR  = MAX) then


The linear queue suffers from serious drawback that performing some operations, we can not insert items into queue, even if there is space in the queue. Suppose we have queue of 5 elements and we insert 5 items into queue, and then delete some items, then queue has space, but at that condition we can not insert items into queue.

So A is the answer 

answered ago by (255 points)  

look at the link u provide..

the memory is utilized more efficient in case of circular queue's.

in cicrcular queue as we can again go back to the first node from the last node we can utilize those vacant places.But in simple queue we cant 

yes. a should be the answer

Related questions

+1 vote
1 answer
asked in Computer Networks by jothee Veteran (77.7k points)   | 84 views
0 votes
3 answers
+1 vote
1 answer

Top Users Jun 2017
  1. Bikram

    3694 Points

  2. Hemant Parihar

    1484 Points

  3. junaid ahmad

    1432 Points

  4. Arnab Bhadra

    1372 Points

  5. Niraj Singh 2

    1311 Points

  6. Rupendra Choudhary

    1194 Points

  7. rahul sharma 5

    1114 Points

  8. Arjun

    930 Points

  9. srestha

    922 Points

  10. Debashish Deka

    896 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 Jun 19 - 25
  1. Bikram

    1950 Points

  2. Niraj Singh 2

    1306 Points

  3. junaid ahmad

    502 Points

  4. sudsho

    410 Points

  5. akankshadewangan24

    388 Points

23,353 questions
30,061 answers
28,378 users