Self-Review Exercises

  1. 19.1 State whether each of the following is true or false. If false, explain why.

    1. In a queue, the first item to be added is the last item to be removed.

    2. Trees can have no more than two child nodes per node.

    3. A tree node with no children is called a leaf node.

    4. Linked-list nodes are stored contiguously in memory.

    5. The primary operations of the stack data structure are enqueue and dequeue.

    6. Lists, stacks and queues are linear data structures.

  2. 19.2 Fill in the blanks in each of the following statements:

    1. A(n) class is used to define nodes that form dynamic data structures, which can grow and shrink at execution time.

    2. Operator allocates memory dynamically; this operator returns a reference to the allocated memory.

    3. A(n) is a constrained version of a linked list in which nodes can be inserted and deleted only from the start of the list; this data structure returns node values in last-in, first-out order.

    4. A queue is a(n) data structure, because the first nodes inserted are the first nodes removed.

    5. A(n) is a constrained version of a linked list in which nodes can be inserted only at the end of the list and deleted only from the start of the list.

    6. A(n) is a nonlinear, two-dimensional data structure that contains nodes with two or more links.

    7. The nodes of a(n) tree contain two link members.

    8. The tree-traversal algorithm that processes the node then processes all the nodes to its left followed by all the nodes to its right is called.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset