Something can be an algorithm despite not necessarily giving you exactly the outcome you want. Hence approximation algorithms and probabilistic algorithms.
Edit: the boundaries between algorithms and heuristics are complicated. Colloquial usage referring to heuristics as something like “rules of thumb” and algorithms as “a set of directions” is what was intended.
Something can be an algorithm despite not necessarily giving you exactly the outcome you want. Hence approximation algorithms and probabilistic algorithms.
Edit: the boundaries between algorithms and heuristics are complicated. Colloquial usage referring to heuristics as something like “rules of thumb” and algorithms as “a set of directions” is what was intended.