Design questions ask you to build a small class with several operations, each with a cost target. The trick is to decide what state to keep so that every operation is cheap, then to keep that state correct after every change.
Start by listing the operations and their target costs. If an operation must be O(1), it cannot scan, so the answer must already be stored somewhere. A minimum that survives pops means storing the minimum with each entry. A rate limit without timers means refilling lazily when a request arrives. Versioned reads without copies mean storing only changes and searching them.
In these exercises the class is replayed through a list of operations so the checker can test it, but talk about it as a class in an interview: name the fields, give each method's cost, and say which invariant every method keeps. Then test the edge cases out loud: an empty structure, repeated values, and the first and last versions.
Store the answer to the expensive question alongside each change.