Philips Interview Question

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