Question #1: A stack is a sequence container allows inserts at the ____________ and removal at the ____________ of the sequence.
Question #2: A queue is a sequence container allows inserts at the ____________ and removal at the ____________ of the sequence.
Question #3: A stack is implemented with the ____________ class template in the ____________ library; a queue is implemented with the ____________ class template in the ____________ library.
Question #4: A stack is known as a "last in, ____________" container.
Question #5: A queue is known as a "first in, ____________" container.
Code #1:
Write a declaration for a stack of int
s named
cards
.
Code #2:
Write a declaration for a queue of double
s named
waitingLine
.
Code #3:
Write statements that inserts the value 3 in cards
and also
adds it to waitingLine
.
Code #4:
Write an expression whose value is the top value of cards
;
write an expression whose value is the front value of
waitingLine
.
Code #5:
Write expressions that test if value
and
moreValues
are empty.