One solution to the problem of running out of space for an array-based list implementation is to replace the array with a larger array whenever the original array overflows. A good rule that leads to an implementation that is both space and time efficient is to double the current size of the array when there is an overflow. Reimplement the array-based List class of Figure 4.2 to support this array-doubling rule.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here