Learn Command Pattern — a key concept for LLD interviews.
Interactive — Try it yourself!
How to use
1Select "Command" tab — see a text editor
2Click Bold, Italic, Underline — each applies formatting
3See the Command Stack fill up on the right
4Click "Undo" — last command reversed. "Redo" — reapplied!
In a nutshell
Command Pattern encapsulates actions as objects. Each action (Bold, Italic) is a command with execute() and undo(). Enables undo/redo, macro recording, and queued execution.