What is Strategy pattern?
It encapsulates a family of algorithms and makes them interchangeable at run time. Examples: Sorting report data (Sort by name, Sort by date…), payment strategies (Debit card, credit card, UPI,…) When to use: To Change behaviour at runtime.
eg: different payment strategies based on user input…