Algorithm and algorithm implementation
Algorithm is the soul and foundation of all programming.
Many developers know the famous formula "program = data structure + algorithm". To put it simply, I prefer the form to be "daemon = data + logic".
1 what is an algorithm?
Literally:
The algorithm is a method for calculation, and the expected calculation results can be achieved by this method.
Other experts say:
Algorithm is an accurate description method to solve practical problems, and algorithm is an accurate description method to solve specific problems.
Broad definition:
The algorithm is a set of feasible, definite and finite rules for model analysis.
In popular terms:
The algorithm can be understood as a complete problem-solving step, which is composed of some basic operations and prescribed operation sequence.
To put it simply:
Algorithm: the way to solve the problem.
Features: finite certainty, input and output feasibility
2 algorithm classification
2.1 categorized by application
Basic algorithm, data structure algorithm, geometric algorithm, graph theory algorithm, planning algorithm, numerical analysis algorithm, encryption algorithm, sorting algorithm, search algorithm
2.2 according to certainty
Deterministic algorithm, non-deterministic algorithm
2.3 the idea of algorithm to divide
Recursive algorithm, recursive algorithm, exhaustive algorithm, greedy algorithm, divide-and-conquer algorithm, etc.