13,269 views
9 votes
9 votes

Stack A has the entries a, b, c (with a on top). Stack B is empty. An entry popped out of stack A can be printed immediately or pushed to stack B. An entry popped out of the stack B can be only be printed. In this arrangement, which of the following permutations of a, b, c are not possible?

  1. b a c
  2. b c a
  3. c a b
  4. a b c

1 Answer

Best answer
10 votes
10 votes
ans is C  c a b is not possible
selected by
Answer:

Related questions

4 votes
4 votes
1 answer
1
go_editor asked Jun 13, 2016
3,225 views
A complete binary tree with the property that the value at each node is at least as large as the values at its children is known asbinary search treeAVL treecompletely ba...
5 votes
5 votes
3 answers
2
go_editor asked Jun 13, 2016
14,577 views
Which of the following operations is performed more efficiently by doubly linked list than by linear linked list?Deleting a node whose location is givenSearching an unsor...
2 votes
2 votes
1 answer
3
go_editor asked Jun 13, 2016
17,856 views
The time required to search an element in a linked list of length n is$O(\log_2 n)$$O(n)$$O(1)$$O(n^2)$
2 votes
2 votes
5 answers
4
ajit asked Sep 20, 2015
19,389 views
The minimum number of fields with each node of doubly linked list is1234