KRHS Internet Lesson

Teacher Name:Mr. Rung                          Date of Lesson: May

Course Name: C++                    Lesson Name: Chap 17.1.2.3b

Student Name

Password


Objective
To complete the workbook exercises.


Primary Focus
Match the columns below.

Site Links
Course Home Page

Additional Resources

Site Links


How does a computer use a stack during the execution of a program?
A so that it can be reused for any data type
When using an array as a stack, why is it common to build the stack downward from the top of the array rather than up from the end of the array?
B top, pop, isempty, push, length, and flush
Why is it important for a stack class to be implemented as a template class?
C gets data from the keyboard and places it into a queue, then the program pulls the characters out of the queue
What other class is used by the stack class in this chapter?
D Search and retrieval is much faster
List the methods provided by the stack class.
E 2n (n= # of Nodes)
How does the cin stream use a queue?
F it easier to index the array as the stack grows and shrinks.
What methods are provided by the queue class?
G the vector class
In the implementation of a queue discussed in this section, is a destructor needed? Why or why not?
H to store local variables used by functions, and addresses that the program needs
What is the maximum number of nodes possible at leve13 of a binary tree?
I it is difficult to find the correct location for the children, and when the location is found, it is difficult to adjust the tree accordingly
By what factor does the number of nodes grow with each level of a binary tree?
J memory is manually allocated, and must be manually deallocated
What advantage does a binary tree have over a simple linked list in terms of data storage and retrieval?
K front, dequeue, isempty, length, enqueue, and flush
Why is deleting a node with 2 children complicated?
L 8