Nivaar Exam Prep

25-Comp-A4 Program Design and Data Structures

Worked solutions to 7 past sittings (2013–2019), 61 questions. Pick a sitting, or start from a topic below.

Last updated

Study guide for this subject

The study guide for this subject maps 14 topics across the 7 sittings it covers. It works 14 recurring problem types as step-by-step methods and has a formula sheet of 25 entries.

The topics it maps, and how many of those sittings each came up in:

Open the study guide 🔒What the Pass includes

The full guide comes with the Computer Engineering Pass, which is not on sale yet. The worked solutions stay free, with or without a Pass.

Like the solutions, the guide is AI-drafted, checked by scripts and against cited sources, and edited by the operator; it may contain errors. Last checked 6 November 2026.

Topics across the sittings

Topics that come up in more than one of the 7 sittings, taken from the headings of our worked solutions. Each cell links to that sitting's questions on the topic; a blank cell means no question heading in that sitting names it. Tick them off as you study in our topic checklist.

TopicSittingsMay
2013
Dec
2014
May
2016
Dec
2016
Dec
2017
Dec
2018
Dec
2019
Algorithm Design7Q8Q9Q8Q8Q9Q9Q9
File I/O7Q6 Q7Q7 Q8Q6 Q7Q4 Q5Q4 Q5Q4 Q5Q4 Q5
Object-Oriented Design7Q4Q4Q3Q6Q6Q6Q6
Programming7Q1 Q2 Q3Q1 Q2 Q3Q1 Q2Q1 Q2 Q3Q1 Q2 Q3Q1 Q2 Q3Q1 Q2 Q3
Pointer-based Data Structures6Q5Q4 Q5Q7Q7Q7 Q8Q7
Traversals6Q6Q5Q9Q8Q8Q7
Linked Lists5Q5Q4Q7Q7Q8
Sorting5Q8Q3Q8Q2Q9
Binary Trees4Q6Q5Q9Q8
Merging Two Sorted Files3Q7Q5Q5
C++ Complex Number Class2Q4Q6
C++ Set Class2Q3Q6
Horoscope Sign2Q1Q1
Line Reversal2Q3Q2
Self-Describing Integers2Q2Q2

Questions by sitting

December 2019

  1. Question 1: Programming — Horoscope Sign and Compatibility
  2. Question 2: Programming — Reverse a Line and the Saddle Point
  3. Question 3: Programming — Crypto-Arithmetic Puzzle
  4. Question 4: File I/O — Lines and Words per Line
  5. Question 5: File I/O — Merging Two Sorted Files
  6. Question 6: Object-Oriented Design — A C++ Complex Number Class
  7. Question 7: Pointer-based Data Structures — Preorder Traversal and find_min_leaf
  8. Question 8: Linked Lists — Polynomial Representation
  9. Question 9: Algorithm Design and Sorting — Removing Duplicates

December 2018

  1. Question 1: Programming — Sphere Buoyancy and a Subsystem Trade Study
  2. Question 2: Programming — Self-Describing Integers
  3. Question 3: Programming — Magic Square Checker
  4. Question 4: File I/O — Average Word Length
  5. Question 5: File I/O — Balanced Parentheses
  6. Question 6: Object-Oriented Design — A C++ Set Class
  7. Question 7: Pointer-based Data Structures — Duplicating Every Node of a Linked List
  8. Question 8: Pointer-based Data Structures — Inorder Traversal
  9. Question 9: Algorithm Design — One-Pass 0/1 Array Partition

December 2017

  1. Question 1: Programming — Floyd's Triangle and the Three-Way Gold-Bar Division
  2. Question 2: Programming — Hailstone (Collatz) Sequence
  3. Question 3: Programming — Saddle Point in a 2-D Array
  4. Question 4: File I/O — Whitespace-Insensitive File Comparison
  5. Question 5: File I/O — Merging Two Sorted Files
  6. Question 6: Object-Oriented Design — A C++ Matrix Class
  7. Question 7: Pointer-Based Data Structures — Doubly Linked List and a Stack Module
  8. Question 8: Binary Trees — Traversals and Reconstruction
  9. Question 9: Algorithm Design — Recursive Palindrome Test

December 2016

  1. Question 1: Programming — Extension-Cord Selection and ISBN Validation
  2. Question 2: Programming — Line Reversal and Three-Way Coordinate Sorting
  3. Question 3: Programming — VLSI Wire Intersection Detection
  4. Question 4: File I/O — Personalized Mail Merge
  5. Question 5: File I/O — Run-Length Encoding
  6. Question 6: Object-Oriented Design — A Templated Vector Class
  7. Question 7: Pointer-Based Data Structures — Linked-List Queue
  8. Question 8: Algorithm Design — One-Pass 0/1 Partition
  9. Question 9: Binary Trees — Traversals and BST Maintenance

May 2016

  1. Question 1: Programming — Horoscope Sign and Element Compatibility
  2. Question 2: Programming — Self-Describing Integers and a Crypto-Arithmetic Solver
  3. Question 3: Object-Oriented Design — A C++ Set Class
  4. Question 4: Pointer-based Data Structures — Sorted Doubly Linked List
  5. Question 5: Pointer-based Data Structures — Binary Tree Traversal
  6. Question 6: File I/O — Names Common to Three Sorted Files
  7. Question 7: File I/O — Merging Two Sorted Files
  8. Question 8: Algorithm Design and Sorting — Deduplicating a Large Array

December 2014

  1. Question 1: Programming — Sliding-Scale Commission and a Check Digit
  2. Question 2: Programming — Cost and Reliability of Every Subsystem Combination
  3. Question 3: Programming — Line Reversal and Three-Way Sorting
  4. Question 4: Object-Oriented Design — A C++ Complex Number Class
  5. Question 5: Linked Lists — Building and Adding Polynomials
  6. Question 6: Binary Trees — Traversals and Search-Tree Updates
  7. Question 7: File I/O — Testing Two Files for High Similarity
  8. Question 8: File I/O — Replicating and Interleaving a Sound Stream
  9. Question 9: Algorithm Design — One-Pass Partition of a Binary Array

May 2013

  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