Wayground interview question

State Management and Design Patterns