Data Structures 1.0
Data Structures 1.0
1. Top-Down Approach
2. Bottom-Up Approach
Top-Down Approach 14
General Problem
Sub sub task 1 Sub sub task 2 Sub sub task 3 Sub sub task 4
Advantages of Top-Down Approach 15
An Algorithm is an ordered
sequence of well-stated and
effective operations that, when
executed, will produce the results.
Fundamental Characteristics of 20
Algorithms
1. Algorithm must always have one clearly understood starting
point.
2. Algorithm must have one or more clearly understood ending
points.
3. Each operation must be 'effective'.
i.e. can be evaluated, could be easily carried out.
4. Each operation must be 'well defined'.
i.e. clearly understandable, no iota of confusion or ambiguity.
How to Design an Algorithm 26
Algorithms
Greedy algorithm: It works in steps. Selects the best
available option until all options finish. It is widely used.
Divide and Conquer/bottom up approach: The big
problem is divided into same type of smaller problems and
we design the algorithm to combine the implementation of
these smaller problems for implementing the bigger problem.
Randomized algorithm: The feature of random number is
used instead of a fixed number. It makes it possible for
different input data to be entered to give different results.
Approaches contn'd 28