578 views
0 votes
0 votes

1 Answer

1 votes
1 votes
Answer for 9th questions is option C and for 10th question is option B.
 

Consider the following queue

  15 23 31 4  _  _

Here n=6, front points at 15(position 1) and rear points at 4(position 4) Here, front<=rear;

Option a) Numb = 6+4-1+1 =  10    False.

Option b) Numb= 10  False

Option c) Numb= 4-1+1 = 4   True

Option d) Numb = 6+4-1-1 =  8    False.

Hence  Ans is c) for Q9 {credits for 9th questions answer : @Meet2698. }

Subsequently for Q10

For condition front<= rear : 9-3+1 = 7

And for condition rear<front : 12-+4-9+1 = 8

So answer option B.

Related questions

0 votes
0 votes
0 answers
1
target2017 asked Jan 21, 2017
931 views
Doubt: dequeue really deletes the element or just moves the pointer? I'm not getting the answer.
2 votes
2 votes
1 answer
3
Xylene asked Aug 21, 2017
1,970 views
a)a_cb_b)_abc_c)abc_ _d)_ab_c