Design command executor with undo | Netflix Coding Question