TEKsystems Interview Question

How would you implement an undo/redo in a simple editor