Algorithm Design and Problem-Solving

2026 Syllabus Objectives

By the end of these notes, you should be able to:

  1. Understand the program development life cycle: analysis, design, coding, and testing
  2. Understand that computer systems are made up of sub-systems, and how to decompose problems into component parts
  3. Explain the purpose of a given algorithm
  4. Understand standard methods of solution (linear search, bubble sort, totalling, counting, finding maximum, minimum and average values)
  5. Understand the need for validation and verification checks on input data, and the different types of each
  6. Suggest and apply suitable test data (normal, abnormal, extreme, boundary)
  7. Complete a trace table to document a dry-run of an algorithm
  8. Identify errors in given algorithms and suggest corrections
  9. Write and amend algorithms using pseudocode, program code, and flowcharts

1. The Program Development Life Cycle

The program development life cycle is the step-by-step process programmers follow to create software. It has four main stages:

Stage 1: Analysis

This is where you work out what the problem is and what you need to do to solve it.

Key tasks in analysis:

  • Abstraction – Removing unnecessary details and focusing only on the important information. For example, if you're creating a student database, you might need name and age, but not favorite color.

  • Decomposition – Breaking down a big problem into smaller, more manageable parts. For example, a "student management system" can be broken into: add student, delete student, search for student, display all students.

  • Identifying the problem – Understanding exactly what needs to be solved.

  • Identifying requirements – Working out what inputs, processes, outputs, and storage the program needs.

Example: You want to create a program that calculates exam averages for students.

  • Problem: Teachers spend too long calculating averages by hand.
  • Requirements: Input student marks, process by adding them up and dividing, output the average.

Stage 2: Design

This is where you plan how the solution will work before writing any actual code.

Key tasks in design:

  • Decomposition – Continue breaking the problem into smaller sub-problems.

  • Structure diagrams – Visual diagrams that show how a system is divided into sub-systems (we'll look at these in detail later).

  • Flowcharts – Visual diagrams using shapes and arrows to show the steps and decisions in an algorithm.

  • Pseudocode – Writing the algorithm using simple English-like statements that are structured but not real code.

Example: For the exam average program, you might design a flowchart showing: START → INPUT marks → CALCULATE average → OUTPUT average → STOP.

Stage 3: Coding

This is where you write the actual program code based on your design.

Key tasks in coding:

  • Writing program code – Translating your design (flowcharts/pseudocode) into a real programming language like Python, Java, or C++.

  • Iterative testing – Testing small parts of your code as you write them, fixing errors as you go, rather than waiting until the end. This makes it easier to find and fix problems.

Example: You write a Python function to calculate the average, then test it immediately with some sample marks to make sure it works correctly.

Stage 4: Testing

This is where you thoroughly test the finished program to make sure it works correctly in all situations.

Key tasks in testing:

  • Testing with test data – Using different types of data (normal, abnormal, extreme, boundary) to check the program handles all situations correctly (we'll cover test data types later).

Example: Test the average calculator with:

  • Normal data: marks like 50, 60, 70
  • Extreme data: the highest valid mark (100) and lowest (0)
  • Abnormal data: invalid inputs like -5 or 150

Sign in to view full notes