0 votes 0 votes Sambhrant Maurya asked Jul 15, 2018 Sambhrant Maurya 337 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes ques 9- option (c) is correct question 10-option (b) is correct. Anil Ji answered Jul 15, 2018 Anil Ji comment Share Follow See all 2 Comments See all 2 2 Comments reply Mayankprakash commented Jul 16, 2018 reply Follow Share @ Anil Can you please explain how you are calculating NUMB eg Numb = 4 +0 -2+1 . Or how you calculating numb for both condition (front<=rear and front> rear) .I want to understand the process to solve. Thanks 0 votes 0 votes Anil Ji commented Jul 16, 2018 reply Follow Share i just have taken some values to check the options ,i have take N(number of cells)=4,one point to notice here is that front is used to dequeue and rear is used to enqueue.So front will point to the first element to has inserted and rear will point to the last element inserted.I have randomly chosen the number of elements in the first condition i have taken 4 elements(you can check the options by taking number of elements by your choice).i have marked index of array from 0 to 3. for first part i have taken 4 elements in the array and condition is front<=rear (front =0 and rear=3 so condition is satisfied) so by putting the values into the options given if we get NUMB=4 then option will be correct for first condition.so.In option (C) NUMB=REAR-FRONT+1=3-0+1=4(hence its true) simillarly you can do for second part. 1 votes 1 votes Please log in or register to add a comment.