Question DSA-STK-0071
HardPushes are 1, 2, 3, 4, 5 in order with pops allowed in between. Which pop sequence is possible?
- A.
3, 2, 5, 4, 1
- B.
1, 5, 2, 4, 3
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Stacks question
Pushes are 1, 2, 3, 4, 5 in order with pops allowed in between. Which pop sequence is possible?
3, 2, 5, 4, 1
1, 5, 2, 4, 3
Sign up free to see the answer and a step-by-step explanation.
5, 1, 2, 3, 4
3, 1, 2, 5, 4