SSC IMD SA Mock 01 – Question 130

Question:

What is the minimum number of stacks required to implement a FIFO queue?

एक FIFO कतार (Queue) को लागू करने के लिए न्यूनतम कितने स्टैक की आवश्यकता होती है?

Options:

  • 2
  • 1
  • 3
  • 4
  • 2
  • 1
  • 3
  • 4

Correct Answer: a)

Explanation:

At least 2 stacks are required to implement a queue (one stack for enqueue operations and a second stack for reversing the LIFO order for dequeue operations) (Option a).

एक FIFO कतार को दो LIFO स्टैक का उपयोग करके लागू किया जा सकता है (एक इन्सर्ट करने के लिए और दूसरा निकालने के लिए) (विकल्प a)।

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top