Strategy vs Template Method

Both Strategy and Template Method allow you to vary part of an algorithm. What is the fundamental difference in how they achieve this?

A

Strategy requires virtual functions, while Template Method uses function pointers

B

Strategy uses composition (injecting the varying behavior as an object), while Template Method uses inheritance (overriding steps in a subclass)

C

Strategy works at compile time, while Template Method works at runtime

D

Strategy defines the entire algorithm externally, while Template Method only defines individual steps