CMPU-203: Introduction to Computer Science III
Quiz #4
Due: Monday, Nov. 19
-
What is the difference between a deque and a vector?
-
What are at least two operations for which lists are better than
vectors?
-
What are at least two operations for which deques are better than
lists?
-
Write a simple for-loop that, given a container c, a list l, and an
iterator i that references a location in l, will merge all the
elements of c into l, beginning at i (in l). Assume the two containers
contain LessThanComparable elements, and use this comparison as the
basis for the merge. You can not use the merge STL template,
you must write a for-loop. After the loop, c should be
unchanged, and l should contain the result of the merge.