Module 0: Introduction

Studio


Racing Arrays
Authors:

Authors:
Abstract: Arrays are a fundamental and useful data type. Once an array is allocated, it cannot change size. Nonetheless, we can build lists and other data structures using arrays if we are willing to replace an old, full array with a bigger one.

In this assignment, you study various ways to formulate a bigger array to replace one that has no room left. The point of this work is to understand that the choices you make matter greatly in terms of performance.


Implementation


Empirical Analysis


Mathematical analysis

Based on empirical obsevation, you should have some idea about the cost of accommodating expanding data in an already full array by The latter approach may seem more reasonable, because the array is never provisioned to be any larger than necessary.

But what about the cost of keeping the array so close to its necessary size?

For an array that eventually reaches size n, how much work is expended by each of the above approaches?

Discuss this with the instructor or TA.


Submitting your work (read carefully)



Last modified 09:46:23 CDT 22 August 2016