Practice Bank — 200+ problems
The rule of the bank: every problem is a complete item — statement, difficulty, topics, input/output, constraints, sample tests, hints, reference solution, explanation — and every problem is pedagogically distinct: no variable-renamed duplicates. If two problems look alike, their idea differs (that difference is stated in the explanation).
The five tiers
| Tier | Units first | Problems | The territory |
|---|---|---|---|
| Beginner | 01–04 | 40 | variables, arithmetic, I/O, conditions — 10 each across four topics |
| Basic | 05–07 | 40 | loop mastery, patterns, digit work, first functions |
| Intermediate | 08–11 | 40 | collections, strings, decomposed designs, records |
| Advanced | 12–14 | 40 | files, pointers, recursion, search & sort, class design |
| Challenge | 14–16 | 40 | OOP systems, STL, exceptions, integrated problems |
The topic × tier matrix
Every cell is a count; the checklists on each tier page let you tick individual problems (B-xx, Ba-xx, I-xx, A-xx, C-xx).
| Topic | Beg | Bas | Int | Adv | Chal | Total |
|---|---|---|---|---|---|---|
| Variables & expressions | 10 | — | — | — | — | 10 |
| Input / output | 10 | — | — | — | — | 10 |
| Conditions | 10 | — | — | — | — | 10 |
| Loops | 10 | 20 | 6 | — | — | 36 |
| Functions | — | 20 | 8 | 2 | 2 | 32 |
| Arrays / collections | — | — | 12 | 4 | 4 | 20 |
| Strings | — | — | 12 | 4 | 4 | 20 |
| Pointers | — | — | — | 10 | 2 | 12 |
| Structures / records | — | — | 2 | 6 | 2 | 10 |
| Files | — | — | — | 8 | 4 | 12 |
| Recursion | — | — | — | 8 | 2 | 10 |
| Searching | — | — | — | 4 | 2 | 6 |
| Sorting | — | — | — | 4 | 2 | 6 |
| OOP | — | — | — | 8 | 6 | 14 |
| STL | — | — | — | — | 8 | 8 |
| Exceptions | — | — | — | — | 4 | 4 |
| Integrated | — | — | — | — | 6 | 6 |
| Total | 40 | 40 | 40 | 40 | 40 | 200 |
(Counts sum per tier; several problems deliberately cross topics — each lists its full topic set.)
How to work the bank
- Match the tier to your units, then pick by topic weakness — the matrix tells you where your ticks are thin.
- Attempt on paper or in the editor for 15 minutes before any hint. The hints are graded; take exactly one.
- Test with the samples before inventing more. Then invent the edge case the samples don’t cover — that habit is the real syllabus.
- Read the reference solution only after your own works — then compare designs: what did yours compute that the reference doesn’t, and vice versa?
- Tick the checklist cell only when the problem passes its own samples plus one self-invented test.
The progress checklist (mark your bank position)
Beginner — beginner.md
- Variables: B-01 ☐ B-02 ☐ B-03 ☐ B-04 ☐ B-05 ☐ B-06 ☐ B-07 ☐ B-08 ☐ B-09 ☐ B-10 ☐
- Input/Output: B-11 ☐ B-12 ☐ B-13 ☐ B-14 ☐ B-15 ☐ B-16 ☐ B-17 ☐ B-18 ☐ B-19 ☐ B-20 ☐
- Conditions: B-21 ☐ B-22 ☐ B-23 ☐ B-24 ☐ B-25 ☐ B-26 ☐ B-27 ☐ B-28 ☐ B-29 ☐ B-30 ☐
- Loops: B-31 ☐ B-32 ☐ B-33 ☐ B-34 ☐ B-35 ☐ B-36 ☐ B-37 ☐ B-38 ☐ B-39 ☐ B-40 ☐
Basic — basic.md
- Loops (mastery): Ba-01 ☐ Ba-02 ☐ Ba-03 ☐ Ba-04 ☐ Ba-05 ☐ Ba-06 ☐ Ba-07 ☐ Ba-08 ☐ Ba-09 ☐ Ba-10 ☐
- Loops (patterns & digits): Ba-11 ☐ Ba-12 ☐ Ba-13 ☐ Ba-14 ☐ Ba-15 ☐ Ba-16 ☐ Ba-17 ☐ Ba-18 ☐ Ba-19 ☐ Ba-20 ☐
- Functions: Ba-21 ☐ Ba-22 ☐ Ba-23 ☐ Ba-24 ☐ Ba-25 ☐ Ba-26 ☐ Ba-27 ☐ Ba-28 ☐ Ba-29 ☐ Ba-30 ☐
- Functions (design): Ba-31 ☐ Ba-32 ☐ Ba-33 ☐ Ba-34 ☐ Ba-35 ☐ Ba-36 ☐ Ba-37 ☐ Ba-38 ☐ Ba-39 ☐ Ba-40 ☐
Intermediate — intermediate.md
- Arrays: I-01 ☐ I-02 ☐ I-03 ☐ I-04 ☐ I-05 ☐ I-06 ☐ I-07 ☐ I-08 ☐ I-09 ☐ I-10 ☐ I-11 ☐ I-12 ☐
- Strings: I-13 ☐ I-14 ☐ I-15 ☐ I-16 ☐ I-17 ☐ I-18 ☐ I-19 ☐ I-20 ☐ I-21 ☐ I-22 ☐ I-23 ☐ I-24 ☐
- Functions & records: I-25 ☐ I-26 ☐ I-27 ☐ I-28 ☐ I-29 ☐ I-30 ☐ I-31 ☐ I-32 ☐ I-33 ☐ I-34 ☐ I-35 ☐ I-36 ☐
- Loops (applied): I-37 ☐ I-38 ☐ I-39 ☐ I-40 ☐
Advanced — advanced.md
- Pointers: A-01 ☐ A-02 ☐ A-03 ☐ A-04 ☐ A-05 ☐ A-06 ☐ A-07 ☐ A-08 ☐ A-09 ☐ A-10 ☐
- Files: A-11 ☐ A-12 ☐ A-13 ☐ A-14 ☐ A-15 ☐ A-16 ☐ A-17 ☐ A-18 ☐
- Recursion: A-19 ☐ A-20 ☐ A-21 ☐ A-22 ☐ A-23 ☐ A-24 ☐ A-25 ☐ A-26 ☐
- Searching & sorting: A-27 ☐ A-28 ☐ A-29 ☐ A-30 ☐ A-31 ☐ A-32 ☐
- OOP: A-33 ☐ A-34 ☐ A-35 ☐ A-36 ☐ A-37 ☐ A-38 ☐
- Functions & structures: A-39 ☐ A-40 ☐
Challenge — challenge.md
- OOP: C-01 ☐ C-02 ☐ C-03 ☐ C-04 ☐ C-05 ☐ C-06 ☐
- STL: C-07 ☐ C-08 ☐ C-09 ☐ C-10 ☐ C-11 ☐ C-12 ☐ C-13 ☐ C-14 ☐
- Exceptions: C-15 ☐ C-16 ☐ C-17 ☐ C-18 ☐
- Integrated: C-19 ☐ C-20 ☐ C-21 ☐ C-22 ☐ C-23 ☐ C-24 ☐
- Cross-topic: C-25 ☐ C-26 ☐ C-27 ☐ C-28 ☐ C-29 ☐ C-30 ☐ C-31 ☐ C-32 ☐ C-33 ☐ C-34 ☐ C-35 ☐ C-36 ☐ C-37 ☐ C-38 ☐ C-39 ☐ C-40 ☐
— Engr. Dr. Muhammad Nadeem Majeed, Professor, Department of Data Science (PUCIT), University of the Punjab, Lahore · About the instructor