Answers to Self-Review Exercises

  1. 19.1

    1. referential.

    2. new.

    3. stack.

    4. predicate.

    5. first-in, first-out (FIFO).

    6. link.

    7. delete.

    8. queue.

    9. tree.

    10. last-in, first-out (LIFO).

    11. binary.

    12. root.

    13. child or subtree.

    14. leaf.

    15. inorder, preorder, postorder and level order.

  2. 19.2 It’s possible to insert a node anywhere in a linked list and remove a node from anywhere in a linked list. Nodes in a stack may only be inserted at the top of the stack and removed from the top of a stack.

  3. 19.3 A queue data structure allows nodes to be removed only from the head of the queue and inserted only at the tail of the queue. A queue is referred to as a first-in, first-out (FIFO) data structure. A stack data structure allows nodes to be added to the stack and removed from the stack only at ...

Get C++ How to Program, 10/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.