Laboratory No.6
Laboratory No.6
Algorithm Development
Objectives
Introduction
• Characteristics:
1. Start.
6. Stop.
Activities
1. Start.
5. Stop.
Answer Key:
1. Start.
2. Input N.
3. Set Factorial = 1.
4. For i from 1 to N:
o Factorial = Factorial * i.
5. Output Factorial.
6. Stop.
• Flowchart Steps:
1. Start.
3. Check N % 2 == 0:
4. Stop.
Activity 4: Efficiency Analysis
Answer Key:
• Binary search is more efficient because it has a time complexity of O(log n), while linear search
has O(n). Binary search reduces the problem size by half with each step.