Algorithm and Program Step by step procedure for solving a computational problem. Independent dependent
Characteristics of Algorithm Input: zero or more quantities are externally supplied. Output: At least one quantity is produced Definiteness (confidence): Each instruction is clear and unambiguous (clear cut). Finiteness: The algorithm must terminate after a finite number of steps. Effectiveness: Each instruction is very basic, so that can be carried out in a finite amount of time and it must be feasible (sufficient)
Time Complexity Example
C1=n+1 ( eg : n=10 means, it executes 11 times ) C2=n (it enters the loop when condition is true. So 10 times)