NivaarExam PrepOfficial exam papers ↗

25-Comp-A4 Program Design and Data Structures: May 2013

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

  1. Question 1 Programming
  2. Question 2 Programming
  3. Question 3 Programming
  4. Question 4 Object-Oriented Design
  5. Question 5 Pointer-based Data Structures
  6. Question 6 File I/O
  7. Question 7 File I/O
  8. Question 8 Algorithm Design and Sorting

Start with Question 1 →

National Exams — May 2013 — 98-Comp-A4 Program Design and Data Structures. Three-hour, closed-book exam, no calculator permitted. Format: eight questions, candidates answer any five (all questions equal weight; only the first five appearing in the answer book are marked). Pseudocode or a high-level language (C or C++) is acceptable throughout — marking emphasizes program operation, not syntactic detail. All eight questions are solved below for completeness. No marks breakdown per sub-part is given on the source paper beyond the "equal weight" instruction.

Reference texts: Cormen, Leiserson, Rivest & Stein, Introduction to Algorithms (3rd ed., MIT Press) — algorithm design, complexity analysis, sorting; Weiss, Data Structures and Algorithm Analysis in C (2nd ed., Pearson) — linked lists, stacks, pointer-based structures; Deitel & Deitel, C++ How to Program (9th ed., Pearson) — classes, templates, operator overloading; Kernighan & Ritchie, The C Programming Language (2nd ed.) — file I/O and arrays.