This website is preserved for historical and scholarly reference and is no longer actively maintained.
QUIZ 17
October 5, 1998
#1. Explain the difference between the size and the capacity of a vector.
Then a vector needs to be extended, either of two methods may be employed. (1) The number of elements in the vector may be extended by a fixed increment, or (2) the number of elements in the vector may be doubled.
#2. Which of these methods leads to order n-square behavior and which leads to order n behavior?
#3. What action is taken by the method ensureCapacity if the capacity increment is zero?