An algorithm, according to the American Heritage Dictionary, is defined as follows:
"A finite set of unambiguous instructions that given some set of initial conditions can be performed in a prescribed sequence to achieve a certain goal and that has a recognizable set of end conditions."
Designing an algorithm is about coming up with this "finite set of unambiguous instructions" in the most efficient way to "achieve a certain goal." For a complex real-world problem, designing an algorithm is a tedious task. To come up with a good design, we first need to fully understand the problem we are trying to solve. We start by figuring out what needs to be done (that is, understanding the requirements) before looking into how it will be done (that is, designing the algorithm). Understanding the problem...