Can someone please explain to me what is the difference between the template method pattern and the strategy pattern is?
As far as I can tell they are 99% the same -
In strategy pattern subclasses are running the show and they control the algorithm. Here code is duplicated across the subclasses. The knowledge of the algorithm and how to implement it is distributed over many classes.
In template pattern, base class has algorithm. It maximizes the reuse among the subclasses. Since algorithm lies in one place, base class protects it.