Written Questions
There are multiple ways to represent sequences of items (a.k.a. lists). In this assignment, we've focused on making a linked list, but previously we've looked at array-like structures—both C++'s built-in (primitive) fixed-size arrays and std::vector, which behaves like a flexibly sized array.
std::vector provides its “flexible array” by using a primitive array behind the scenes, but only using a portion of the array to store data, with the remaining space unused. When that space is filled, it reallocates the array (following a doubling strategy like the one we saw in the CoordVector class in the previous assignment).
Every approach has different trade-offs, which we can analyze theoretically and explore empirically.
Your task is to explore the performance of sequence data structures from both a theoretical and practical perspective, and answer some questions on Gradescope along the way.
…but keep this tab open and head to the two subpages below:
- Q1: Analyzing Two Designs for an
IntVectorClass — GradeScope Question 1 - Q2: Empirical Performance Analysis of Your
IntListClass — GradeScope Question 2
(When logged in, completion status appears here.)