Write out your answers for these questions on a separate piece of paper.
Question #1:
The values in a vector
are stored in ____________ memory
locations.
Question #2:
The values in a list
are stored in ____________ memory
locations.
Question #3: Draw the graphs of constant time and linear time operations.
Question #4:
The ____________ is a special node at the beginning of a list
.
Question #5:
____________ are used to link the nodes of a list
together.
Code #1:
Write declarations for aList
and aVec
, a list
and a vector
of double
s, respectively.
Code #2:
Write expressions that evaluate to the lengths of aList
and
aVec
.
Code #3:
Write statements that add the value 3.14159 to the end of aList
and aVec
.
Code #4:
Write the statements that add the value 2.7183 to the front of
aList
and aVec
.
Code #5:
Write the statements that remove the last values of aList
and aVec
.