...
2018 July 22 NTA UGC NET Paper 1
December 3, 2023
NTA UGC NET JUNE-2023 Paper-2
December 3, 2023
2018 July 22 NTA UGC NET Paper 1
December 3, 2023
NTA UGC NET JUNE-2023 Paper-2
December 3, 2023

NTA UGC NET JUNE-2023 Paper-2

Question 19
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
EMPTY: REAR == FRONT , FULL: (REAR+1) mod n == FRONT
B
EMPTY: (FRONT+1) mod n == REAR,FULL: (REAR+1) mod n == FRONT
C
EMPTY: (REAR+1) mod n == FRONT,FULL: REAR == FRONT
D
EMPTY: REAR == FRONT,FULL: (FRONT+1) mod n == REAR empty
Question 19 Explanation: 
The correct conditions are:

EMPTY: REAR == FRONT, FULL: (REAR + 1) mod n == FRONT

Correct Answer: A
Question 19 Explanation: 
The correct conditions are:

EMPTY: REAR == FRONT, FULL: (REAR + 1) mod n == FRONT

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x