Skip to content
Sharp

Design patterns · interview question

Which of the following best describes the Strategy Pattern?

Multiple choiceEasychapter-13-curatedpremiumdesign-patternsstrategy-pattern
Choose one answer
Answer and explanation

Correct answer

C. Encapsulates interchangeable algorithms and allows their dynamic selection at runtime.

Why

The Strategy Pattern encapsulates interchangeable algorithms and allows the client to choose among them dynamically at runtime. This is useful when you have multiple algorithms to perform a task but want to isolate the selection logic.

Test yourself on Design patterns

A free test with instant, explained results. No account needed.

Start free test
All Design patterns questions →