Philips interview question

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