Microsoft interview question

Implement an undo redo system