Page 43 - UR221 Creative & Scientific Thinking_Neat
P. 43

3.20 Algorithmic Problem Solving

















































                                               Figure 3.4: Decomposition


                   This structure improves readability, maintenance, and debugging.



               3.20       Algorithmic Problem Solving


                   Algorithmic problem solving involves designing a step-by-step procedure to solve a

               problem. Algorithms must be:

                   ˆ   orrect                                                                                                  C
                   ˆ   fficient                                                                                                E

                   ˆ   lear                                                                                                    C

                   ˆ   inite                                                                                                   F
               Algorithms are the foundation of all computer programs. Example: Algorithm Design

               Problem: Find the largest number in a list. Algorithm:

                  1. Assume the first number is the largest


                  2. Compare it with each number in the list


                                                     34
   38   39   40   41   42   43   44   45   46   47   48