SOTI Interview Question

Implement Undo and Redo functionality using DSA?