Courses / HEC NSCT – National Skill Competency Test: Complete Preparation for Computing Graduates
1.4 Algorithmic Thinking, Flowcharts and Tracing
Area 1 – Problem Solving & Analytical Skills (20%) · 45 min read · 35 MCQs to check yourself
Algorithm = a finite, ordered, unambiguous list of steps
Good algorithms are correct, finite (they stop), efficient and clear.
Flowchart symbols
| Symbol | Meaning |
|---|---|
| Oval | Start / Stop |
| Parallelogram | Input / Output |
| Rectangle | Process (calculation) |
| Diamond | Decision (yes/no) |
| Arrow | Flow of control |
How to trace code in an exam
Make a trace table – one column per variable, one row per loop step.
x = 1
for i in 1..4:
x = x * 2
print(x)
| i | x |
|---|---|
| start | 1 |
| 1 | 2 |
| 2 | 4 |
| 3 | 8 |
| 4 | 16 |
| Output: 16. |
Common building blocks
- Sequence → Selection (if) → Iteration (loop) – every program is made of these three.
- Swap two values: temp = a; a = b; b = temp.
- Count / sum / maximum patterns inside a loop.
- Decomposition: break a big problem into small sub-problems. Abstraction: ignore unimportant detail. Pattern recognition: reuse a known solution.
Flowcharts and pseudocode (Stuff Made Easy)
This lesson ends with a quiz of 35 MCQs. Open the lesson on PrepOasis to take it and save your progress.
Previous: 1.3 Patterns, Series and Coding-Decoding · Next: 1.5 Data Interpretation and Critical Thinking