We will need data structures for holding a million floating-point numbers.
Consider implementing, e.g., a deque (array-like but possible to append / remove elements at either end); this structure should give us all the features we currently use lists for.