LLD - Behavioral Design Patterns — Part 2Which component in the Memento pattern is responsible for storing the internal state of the Originator?AMementoBOriginatorCCaretakerDClientCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify roles in Memento patternThe Originator creates a Memento containing a snapshot of its current internal state. The Memento stores this state.Step 2: Match component to responsibilityThe Memento is the object that stores the internal state. Caretaker manages Mementos but does not store state.Final Answer:Memento -> Option AQuick Check:State storage = Memento [OK]Quick Trick: Memento stores state, Caretaker manages it [OK]Common Mistakes:MISTAKESConfusing Caretaker as state holderThinking Originator stores previous statesAssuming Client stores state
Master "Behavioral Design Patterns — Part 2" in LLD9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More LLD Quizzes Behavioral Design Patterns — Part 1 - Template Method pattern - Quiz 15hard Behavioral Design Patterns — Part 2 - Interpreter pattern - Quiz 9hard Behavioral Design Patterns — Part 2 - Why more behavioral patterns solve communication - Quiz 2easy Behavioral Design Patterns — Part 2 - Mediator pattern - Quiz 9hard Design — Elevator System - Multiple elevator coordination - Quiz 10hard Design — Library Management System - Why library management tests CRUD design - Quiz 6medium Design — Parking Lot System - Parking strategy pattern - Quiz 2easy Design — Tic-Tac-Toe Game - Requirements and game rules - Quiz 13medium Design — Tic-Tac-Toe Game - Win condition checking - Quiz 1easy Design — Tic-Tac-Toe Game - Command pattern for undo - Quiz 14medium