Strategy pattern
Gang-of-Four pattern — define a family of algorithms, encapsulate each as a class with a shared interface, and make them interchangeable at runtime.
Classic: different sorting algorithms (QuickSort, MergeSort, HeapSort) implementing SortStrategy. The client holds a reference to the strategy and delegates. Swappable without changing the client.
In languages with first-class functions strategy is just a function-as-parameter (list.sort(key=...)). In C++/Java it comes as classes. Sweet spot: when algorithms are non-trivial and have their own state.