Coding Challenge · INTERMEDIATE
You are building a simple text editor that supports undo operations. Each time a user types a character, it is added to the document. When the user presses 'UNDO', the most recent character is removed. Given a list of operations representing typed characters or the word 'UNDO', return the final document as a string aft…