A program attempts to generate as many permutations as possible of the integer 1, 2, 3, 4, 5 by pushing in the same order onto a stack, but it may pop off the top character at any time. Which of the following numbers can be generated using this program?

I. 5 4 3 2 1

II. 3 2 1 4 5

III. 1 2 3 4 5

1
Only I
2
Only I and III
3
Only II and III
4
I, II and III
5
Question Not Attempted

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation