• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | GATE 2017 MOCK II | Question 22

Linked Questions 22-23
Stack A has the entries as following sequence a, b, c (with ‘a’ on top), stack B is empty, as shown in the diagram below. stack An entry popped out of stack A can be printed or pushed to stack B. An entry popped out of stack B can only be printed. In this arrangement which of the following permutation of a, b, c are not possible to print?
(i)   bac
(ii)  bca
(iii) cab
(iv)  abc

(A)

(i), (ii) and (iii)

(B)

(iv) Only

(C)

(iii) Only

(D)

(ii) and (iii) Only

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments