Introduction to Design and Analysis of Algorithm
Contents
ToggleAn algorithm is nothing but a step step procedure/approach to find a solution of any problem statement. In other words, it is a procedure for executing a calculation. Even in real world scenario, if any plan is created for any trip , 50% of the process is complete. An algorithm is a blueprint of a given problem.
In computer science, a step by step procedure of any problem statement is an algorithm and is implemented using a programming language. It is used to manipulate data inside data structures. An algorithm can be one or more than one for any given problem statement and the most efficient one among the algorithm’s is used.
Approaches of Designing an Algorithm
- Top Down Approach – In this approach, an algorithm is divided into one or more segments. These segments are further divided into one or more segments if needed for the problem statement. This process is called decomposition. It is a step wise approach where the segments are created in an iterative manner until a stage is reached where no decomposition is needed.
- Bottom-up Approach – It is exactly the opposite of top down approach. In this approach, small segments are designed one by one and then proceeded towards designing a higher level segment. The small segments are integrated together at the higher level. This process continues until the required algorithm is achieved.