CMPU-203: Introduction to Computer Science III

Quiz #5
Due: Monday, Oct. 8

  1. From the hierarchy of concepts we have developed so far (see concept hierarchy), under what concepts would Associative Container appear?

  2. An associative container requires a specific operation be provided for keys. What is that operation?

  3. A sorted associative container requires an additional operation be provided for keys. What is it?

  4. What is a container operation for which sets are particularly well suited?

  5. Finally, consider this graph of the results from the programs we wrote in class on Wednesday. The point of that exercise was to show the difference between a constant time and linear time operation. The results, however, show that both the list and vector implementations are polynomial time. This means that the speed of the program increases with the square of the size of the container. There was clearly a flaw in my reasoning about why these would serve as good examples of this - can you find the flaw? What is it?
    Note: The flaw has nothing to do with the fact that the vector program is faster. From a rough complexity perspective, both programs are in the same class (polynomial). The flaw has to do with why these are polynomial and therefore not good examples of linear vs. constant run times!