Every so often during our software development endeavors we might face situations where the solution(s) can be found easily or the job can be done quickly using typical well-known algorithms that can be implemented routinely. This is the first part of a multi-segment series on programming techniques where we briefly present algorithm methods one by one. This time we are going to cover backtracking.

The Backtracking Algorithm Technique (Page 1 of 4 )

Before we begin, let me present the structure of this series and how each article will be constructed. To preserve clarity and straightforwardness each article will be limited to the presentation of only one algorithm technique. Gradually, we are going to learn each of the fab fives: backtracking, divide and conquer (divide et impera), greedy method, dynamic programming, and branch and bound.

Each article will start by explaining concisely what the algorithm is all about, which are the situations where their application is recommended, and typical places where their usage is efficient and, thus, worthwhile. Then we will present real world applicable examples, first in pseudo-code and then in ANSI C. The problems will be famous for those algorithms under which we'll solve them.

Ultimately, we may some time in the future refer back to the algorithm methods we learned during the earlier parts of the series (no worries, it won't happen with this first part) explaining why this or that may not be considered as a possible solution.

Keep in mind that these articles will give a brief overview of the techniques and their usage, as well as their implementation, but they cannot replace a complete and comprehensive few-days-long course or a text book specializing just on one of the algorithms. Clear presentations with applicable implementations along with succinct resumes are the most we can do. But this series can surely get you started.

All of this being said, I bet you are anxious to begin. Let's backtrack!