You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Thinking ahead means identifying what is needed before you start solving a problem — the inputs, outputs, pre-conditions, and post-conditions. It also involves considering caching and reusable components to make solutions more efficient. This is a key part of OCR H446 section 2.1.
Before writing any code or designing any algorithm, you must clearly identify:
| Concept | Definition | Example (sorting problem) |
|---|---|---|
| Inputs | The data the system receives | An unsorted list of integers |
| Outputs | The data the system produces | A sorted list of integers |
| Processing | The transformation applied to inputs to produce outputs | A sorting algorithm (e.g., merge sort) |
Why identify inputs and outputs first?
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.