Understanding the problem definitions
As we discussed in Chapter 2, Elements of Computational Thinking, computational thinking uses four elements in order to solve problems:
- Problem decomposition: This is the process of breaking down data.
- Pattern recognition: This is the process of finding similarities or patterns.
- Abstraction: This element deals with generalizing the pattern.
- Algorithm design: This is where we define the set of instructions for the solution to the problem.
In this section, in order to learn more about how to analyze problems, we're going to analyze a larger problem and work through the steps needed to create the algorithm. To be able to create algorithms, it is imperative that we analyze the problems and clearly identify what we are trying to solve. That is, what is our algorithm for? Why do we need to build it? Looking at the decomposition of problems and then defining what we need will provide us with a better algorithm at the end...