CompleteGATE Doubts Forum
0 like 0 dislike

Suppose a circular queue of capacity (n −1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are

(A) full: (REAR+1) mod n == FRONT;    empty: REAR == FRONT

(B) full: (REAR+1) mod == FRONT;    empty: (FRONT+1) mod == REAR

(C) full: REAR == FRONT;                       empty: (REAR+1) mod n == FRONT

(D) full: (FRONT+1) mod n == REAR;    empty: REAR == FRONT 

asked Jul 2, 2016 in Data Structures by CompleteGATE-AskUS (3,550 points) | 1,016 views

1 Answer

1 like 0 dislike
Best answer

(A) full: (REAR+1) mod n == FRONT;    empty: REAR == FRONT

answered Jul 2, 2016 by ebeisaac (13,250 points)
selected Jul 11, 2016 by CompleteGATE-AskUS
Welcome to Completegate AskUs, A place where you can ask questions regarding videos located at Youtube Channel and receive answers from our experts.

Sign up for our newsletter to receive the latest news and event postings.

Best Users 11/2019
  1. CompleteGATE-AskUS

    3550 Points

  2. Asma Abbasi

    200 Points

  3. Henry

    150 Points

  4. SilverChat

    140 Points

Rewards per month
First Winner: 0 INR (Not Started)
Second Winner: 0 INR (Not Started)


Like us on Facebook

Show your Support. Become a FAN!

108 questions
100 answers
86 users