InterviewDB Question

Permanent Stack - Coding Interview

Question Details

Problem Design a PermanentStack class that behaves like a standard stack but never truly destroys data. When you pop() an element, it is moved to an internal "archive" rather than discarded. All previously popped elements must remain retrievable. Example: Follow-ups What if restore() must reinstate elements in LIFO order from the archive? How would you implement undo_all() to move every archived element back in original push order? What are the time and space complexities of each operation? How…

Full Details

🔒

Unlock all Affirm questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a reported interview question from a affirm interview during the phone round.

It covers the following topics: Coding, Ood, Onsite, Phone, Stack .