If you can work in the problem-algorithm-solver pattern, I think it is safe to follow that. In that pattern, different algorithms are represented by different types, and the solver function solve
is dispatched by different algorithm types.
1 Like