GeeksForGeeks interview question

Design a data structure to store layers for a PhotoShop-like editor with undo or redo functionality.