In an interview i was asked about the key strategies of template method pattern. I answered Inheritance.Is this the right answer? If anyone can direct me in the right direction? Thanks in advance.
Template Method is a pattern that can provide an excellent way of keeping logic centralised in a base class, while derivatives fill-in the specific details that only they know about. So I would argue that one of its key strategies is to avoid repetition of logic.
However, it has its downsides. Here's just one article that details some of them.
Like all design patterns, it has a time and a place but must be used appropriately.