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

  1. Match the tier to your units, then pick by topic weakness — the matrix tells you where your ticks are thin.
  2. Attempt on paper or in the editor for 15 minutes before any hint. The hints are graded; take exactly one.
  3. Test with the samples before inventing more. Then invent the edge case the samples don’t cover — that habit is the real syllabus.
  4. Read the reference solution only after your own works — then compare designs: what did yours compute that the reference doesn’t, and vice versa?
  5. 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

Basic — basic.md

Intermediate — intermediate.md

Advanced — advanced.md

Challenge — challenge.md

— Engr. Dr. Muhammad Nadeem Majeed, Professor, Department of Data Science (PUCIT), University of the Punjab, Lahore · About the instructor