Which of the following permutation can be obtained in the output (in the same order) using a stack assuming that the input is the sequence 1, 2, 3, 4, 5 in that order? 

(1) 3, 4, 5, 1, 2 (2) 3, 4, 5, 2, 1 (3) 1, 5, 2, 3, 4 (4) 5, 4, 3, 1, 2 
in Computer Engineering by

Related questions

0 answers

9,137 questions

7,896 answers

145 comments

3,237 users