We have developed a good understanding of what backtracking is.
Remember, backtracking is a recursive algorithm.
But then let's discuss how it is different from simple recursion.
Now recursion is, as we have discussed, just a function calling itself until a base condition or a
terminating condition.
When it comes to backtracking, backtracking is controlled recursion.
And remember, in backtracking, the state of the problem is changed in place.
So the way that recursion is implemented in backtracking, which is different from simple recursion,
is that over here you have controlled recursion.
And what does this mean?
Controlled recursion means that whenever we identify that a path is not leading to the solution, we
prune that path or we abandon it.
So this is how backtracking is different from simple recursion.