Content Frame
Note for screen reader users: There is text between the form elements on this page. To be sure that you do not miss any text, use item by item navigation methods, rather than tabbing from form element to form element.
Skip Breadcrumb Navigation
Home  arrow Student Resources  arrow Chapter Quizzes  arrow Chapter 15

Chapter 15

Linked Data Structures

This activity contains 15 questions.

Question 1.
Is it true that LinkedList2 is a "better" implementation of a simple linked list than LinkedList1?


Open Hint for Question 1 in a new window.
 
End of Question 1


Question 2.
Privacy leaks may occur any time a method returns a reference. Does the Node1 getLink method have this problem?


Open Hint for Question 2 in a new window.
 
End of Question 2


Question 3.
The links in a tree node should be declared to be


Open Hint for Question 3 in a new window.
 
End of Question 3


Question 4.
The root in a tree has the property that:


Open Hint for Question 4 in a new window.
 
End of Question 4


Question 5.
What are the advantages of the Iterator pattern?


Open Hint for Question 5 in a new window.
 
End of Question 5


Question 6.

What are the differences between a deep copy and a shallow copy?
  1. A deep copy contains no references in common with the original data structure
  2. A shallow copy contains no references in common with the original data structure
  3. A deep copy usually is more expensive (in time) and more complicated to implement than a shallow copy
  4. A deep copy usually will execute more slowly than a shallow copy

Open Hint for Question 6 in a new window.
 
End of Question 6


Question 7.
What is an immutable iterator?


Open Hint for Question 7 in a new window.
 
End of Question 7


Question 8.
What is the advantage of maintaining a doubly linked list?


Open Hint for Question 8 in a new window.
 
End of Question 8


Question 9.
What is the advantage of maintaining references to both the head and tail (first and last nodes) in a list structure?


Open Hint for Question 9 in a new window.
 
End of Question 9


Question 10.
What must be done in the Java code that deletes a node from a linked data structure?


Open Hint for Question 10 in a new window.
 
End of Question 10


Question 11.

What statement(s) is (are) true?
  1. A balanced tree has about the same number of nodes in its left subtree as in its right subtree, and this is true at all nodes in the tree
  2. A balanced tree has about the same number of leaf nodes in its left subtree as in its right subtree
  3. A balanced tree has about O(log n) worst case running time
  4. Searching a balanced tree is about as efficient as searching a sorted array

Open Hint for Question 11 in a new window.
 
End of Question 11


Question 12.
Which statement(s) are true? A stack:
  1. Exhibits "last in, first out" behavior
  2. Exhibits "first in, first out" behavior
  3. Can be implemented as a simple list
  4. Can be implemented as an array


Open Hint for Question 12 in a new window.
 
End of Question 12


Question 13.

Which statements are true about linked data structures (LDT) ?
  1. An LDT consists of a collection of nodes
  2. A node in an LDT usually contains at least one link
  3. A node in an LDT can contain any kind of data
  4. LDTs (nodes) usually are realized as instances of a class called Node

Open Hint for Question 13 in a new window.
 
End of Question 13


Question 14.

Which statements are true? The three tree traversal variants, preorder, inorder, and postorder...
  1. only apply to sorted binary trees
  2. apply to all binary trees
  3. only apply to trees that are implemented as list structures
  4. apply to all trees, independent of implementation method

Open Hint for Question 14 in a new window.
 
End of Question 14


Question 15.
Would it be a good idea to use a reference back to the head of a list instead of null to indicate the end of a list?


Open Hint for Question 15 in a new window.
 
End of Question 15





Pearson Copyright © 1995 - 2010 Pearson Education . All rights reserved. Pearson Addison Wesley is an imprint of Pearson .
Legal Notice | Privacy Policy | Permissions

Return to the Top of this Page