Another example of heuristic making an algorithm faster occurs in certain search problems.
Initially, the heuristic tries every possibility at each step, like the full-space search algorithm.
But it can stop the search at any time if the current possibility is already worse than the best
solution already found. In such search problems, a heuristic can be used to try good choices first
so that bad paths can be eliminated early.