Question d’entretien chez Philips

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