Which of the following permutation can be obtained in the same order using a stack assuming that input is the sequence 5, 6, 7, 8, 9 in that order?
9, 8, 7, 5, 6
7, 8, 9, 6, 5
5, 9, 6, 7, 8
7, 8, 9, 5, 6
This question is part of this quiz :
Python Stack Quiz