Skip to content

Strategy

Foundation
  • The problem: a growing if/else over behaviors.
  • The pattern, with a class diagram and code.
  • Tradeoff: more types and indirection in exchange for open-for-extension behavior.
  • Where it shows up in the worked problems (parking spot assignment, rate limiter algorithms).