Different techniques may be used depending on the objective, which may include searching, sorting, mathematical optimization, constraint satisfaction, categorization, analysis, and prediction.
[5] Dynamic programming is a systematic technique in which a complex problem is decomposed recursively into smaller, overlapping subproblems for solution.
A greedy technique is generally simple to implement, and these series of decisions can be used to find local optimums depending on where the search began.
However, greedy techniques may not identify the global optimum across the entire set of possible outcomes.,[9] A heuristic approach employs a practical method to reach an immediate solution not guaranteed to be optimal.
[13] Recursion is a general technique for designing an algorithm that calls itself with a progressively simpler part of the task down to one or more base cases with defined results.