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.
Topics across the sittings
Topics that come up in more than one sitting, taken from the headings of our worked solutions. A topic counts once per sitting.
- Algorithm Design (7 sittings): December 2019 Q9 · December 2018 Q9 · December 2017 Q9 · December 2016 Q8 · May 2016 Q8 · December 2014 Q9 · May 2013 Q8
- File I/O (7 sittings): December 2019 Q4 · December 2018 Q4 · December 2017 Q4 · December 2016 Q4 · May 2016 Q6 · December 2014 Q7 · May 2013 Q6
- Object-Oriented Design (7 sittings): December 2019 Q6 · December 2018 Q6 · December 2017 Q6 · December 2016 Q6 · May 2016 Q3 · December 2014 Q4 · May 2013 Q4
- Programming (7 sittings): December 2019 Q1 · December 2018 Q1 · December 2017 Q1 · December 2016 Q1 · May 2016 Q1 · December 2014 Q1 · May 2013 Q1
- Pointer-based Data Structures (6 sittings): December 2019 Q7 · December 2018 Q7 · December 2017 Q7 · December 2016 Q7 · May 2016 Q4 · May 2013 Q5
- Binary Trees (3 sittings): December 2017 Q8 · December 2016 Q9 · December 2014 Q6
- Merging Two Sorted Files (3 sittings): December 2019 Q5 · December 2017 Q5 · May 2016 Q7
- Sorting (3 sittings): December 2019 Q9 · May 2016 Q8 · May 2013 Q8
- Traversals (3 sittings): December 2017 Q8 · December 2016 Q9 · December 2014 Q6
- C++ Complex Number Class (2 sittings): December 2019 Q6 · December 2014 Q4
- C++ Set Class (2 sittings): December 2018 Q6 · May 2016 Q3
- Horoscope Sign (2 sittings): December 2019 Q1 · May 2016 Q1
- Line Reversal (2 sittings): December 2016 Q2 · December 2014 Q3
- Linked Lists (2 sittings): December 2019 Q8 · December 2014 Q5
- Self-Describing Integers (2 sittings): December 2018 Q2 · May 2016 Q2
Questions by sitting
December 2019
- Question 1: Programming — Horoscope Sign and Compatibility
- Question 2: Programming — Reverse a Line and the Saddle Point
- Question 3: Programming — Crypto-Arithmetic Puzzle
- Question 4: File I/O — Lines and Words per Line
- Question 5: File I/O — Merging Two Sorted Files
- Question 6: Object-Oriented Design — A C++ Complex Number Class
- Question 7: Pointer-based Data Structures — Preorder Traversal and find_min_leaf
- Question 8: Linked Lists — Polynomial Representation
- Question 9: Algorithm Design and Sorting — Removing Duplicates
December 2018
- Question 1: Programming — Sphere Buoyancy and a Subsystem Trade Study
- Question 2: Programming — Self-Describing Integers
- Question 3: Programming — Magic Square Checker
- Question 4: File I/O — Average Word Length
- Question 5: File I/O — Balanced Parentheses
- Question 6: Object-Oriented Design — A C++ Set Class
- Question 7: Pointer-based Data Structures — Duplicating Every Node of a Linked List
- Question 8: Pointer-based Data Structures — Inorder Traversal
- Question 9: Algorithm Design — One-Pass 0/1 Array Partition
December 2017
- Question 1: Programming — Floyd's Triangle and the Three-Way Gold-Bar Division
- Question 2: Programming — Hailstone (Collatz) Sequence
- Question 3: Programming — Saddle Point in a 2-D Array
- Question 4: File I/O — Whitespace-Insensitive File Comparison
- Question 5: File I/O — Merging Two Sorted Files
- Question 6: Object-Oriented Design — A C++ Matrix Class
- Question 7: Pointer-Based Data Structures — Doubly Linked List and a Stack Module
- Question 8: Binary Trees — Traversals and Reconstruction
- Question 9: Algorithm Design — Recursive Palindrome Test
December 2016
- Question 1: Programming — Extension-Cord Selection and ISBN Validation
- Question 2: Programming — Line Reversal and Three-Way Coordinate Sorting
- Question 3: Programming — VLSI Wire Intersection Detection
- Question 4: File I/O — Personalized Mail Merge
- Question 5: File I/O — Run-Length Encoding
- Question 6: Object-Oriented Design — A Templated Vector Class
- Question 7: Pointer-Based Data Structures — Linked-List Queue
- Question 8: Algorithm Design — One-Pass 0/1 Partition
- Question 9: Binary Trees — Traversals and BST Maintenance
May 2016
- Question 1: Programming — Horoscope Sign and Element Compatibility
- Question 2: Programming — Self-Describing Integers and a Crypto-Arithmetic Solver
- Question 3: Object-Oriented Design — A C++ Set Class
- Question 4: Pointer-based Data Structures — Sorted Doubly Linked List
- Question 5: Pointer-based Data Structures — Binary Tree Traversal
- Question 6: File I/O — Names Common to Three Sorted Files
- Question 7: File I/O — Merging Two Sorted Files
- Question 8: Algorithm Design and Sorting — Deduplicating a Large Array
December 2014
- Question 1: Programming — Sliding-Scale Commission and a Check Digit
- Question 2: Programming — Cost and Reliability of Every Subsystem Combination
- Question 3: Programming — Line Reversal and Three-Way Sorting
- Question 4: Object-Oriented Design — A C++ Complex Number Class
- Question 5: Linked Lists — Building and Adding Polynomials
- Question 6: Binary Trees — Traversals and Search-Tree Updates
- Question 7: File I/O — Testing Two Files for High Similarity
- Question 8: File I/O — Replicating and Interleaving a Sound Stream
- Question 9: Algorithm Design — One-Pass Partition of a Binary Array
May 2013
- Question 1: Programming
- Question 2: Programming
- Question 3: Programming
- Question 4: Object-Oriented Design
- Question 5: Pointer-based Data Structures
- Question 6: File I/O
- Question 7: File I/O
- Question 8: Algorithm Design and Sorting