Domanda di colloquio di Philips

How do you implement undo and redo(what data structure would you use)?