0 votes 0 votes https://gateoverflow.in/?qa=blob&qa_blobid=11435838562783483664 Approach for Q9 please . (Please note: it is the last question on left hand side, and part of it is written on right hand side) Answer is d, but according to me it should be b as in 3 situation when C is a queue and D is a stack, then it will count the no. Of elements but won't be restored in it's original state as mentioned in question. So only 1 and 2 is possible. Is it correct? DS made-easy-booklet data-structures queue see-later + – manvi_agarwal asked Jul 30, 2018 • edited Mar 5, 2019 by ajaysoni1924 manvi_agarwal 2.0k views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Abbas commented Jul 30, 2018 reply Follow Share I think, you are right 0 votes 0 votes Shaik Masthan commented Jul 30, 2018 reply Follow Share @ manvi_agarwal, yes, you are right.... only 1 and 2 leads correct restoration but 3 leads to reverse restoration. OBSERVATION :- 4) C is a stack and D is a Queue, ===> it also leads reverse restoration 0 votes 0 votes manvi_agarwal commented Aug 8, 2018 reply Follow Share answer is correct, acc to answer key, but how is it possible? can u please elaborate? firstly, 3 statement says C is queue and D is stack, so when elements stored in queue be 1,2,3,4 (left to right) on deleting and pushing to stack will be stored in the form 1,2,3,4 (bottom to up) then after counting the elements, we have to restore the state for which we popped the elements from stack one after the other in the form (4,3,2,1)starting from 4, and pushing back into the queue, we get the queue in the reverse order which is 4,3,,2,1 (left to right) hence not able to restore state with this combination 0 votes 0 votes Shaik Masthan commented Aug 9, 2018 reply Follow Share answer is correct, acc to answer key, but how is it possible? can u please elaborate? who says? Do you believe there is no mistakes in made easy manual or test series ? 0 votes 0 votes manvi_agarwal commented Aug 10, 2018 reply Follow Share yes! i agree, where am i wrong in this explaination?can u justify, after restoring it is not coming to the same stage 0 votes 0 votes Shaik Masthan commented Aug 10, 2018 reply Follow Share you didn't did any wrong... read my first comment 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes As per I think ans is D ... 1 : C -> D -> C 2: C -> D -> C 3: C -> D -> C (element wise) amit srivastava answered Aug 8, 2018 amit srivastava comment Share Follow See all 0 reply Please log in or register to add a comment.