Give me some thoughts how to implement undo/redo functionality - like we have in text editors. What algorithms should I use and what I may read. thanks.
My only two cents is that you would want to use two stacks to keep track of the operations. Every time the user performs some operations, your program should put those operations on a "performed" stack. When user want to undo those operations, simply pop operations from the "performed" stack to a "recall" stack. When user wants to redo those operations, pop items from "recall" stack and push them back to "performed" stack.
Hope it helps.