Java Reference
In-Depth Information
b)
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.
c)
A method that does not alter a linked list, but simply looks at it to determine whether
it's empty, is referred to as a(n)
method.
d)
A queue is referred to as a(n)
data structure because the first nodes inserted
are the first ones removed.
e)
The reference to the next node in a linked list is referred to as a(n)
.
f)
Automatically reclaiming dynamically allocated memory in Java is called
.
g)
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.
h)
A(n) is a nonlinear, two-dimensional data structure that contains nodes with
two or more links.
i)
A stack is referred to as a(n)
data structure because the last node inserted is the
first node removed.
j) The nodes of a(n) tree contain two link members.
k) The first node of a tree is the node.
l) Each link in a tree node refers to a(n) or of that node.
m) A tree node that has no children is called a(n) node.
n) The three traversal algorithms we mentioned in the text for binary search trees are
, and .
o) When compiling types in a package, the javac command-line option specifies
where to store the package and causes the compiler to create the package's directories if
they do not exist.
p) The compiler uses a(n) to locate the classes it needs in the classpath.
q) The classpath for the compiler and JVM can be specified with the option to
the javac or java command, or by setting the environment variable.
r) There can be only one in a Java source-code file, and it must precede all other
declarations and statements in the file.
21.2 What are the differences between a linked list and a stack?
21.3 What are the differences between a stack and a queue?
21.4 Comment on how each of the following entities or concepts contributes to the reusability
of data structures:
a) classes
b) inheritance
c) composition
21.5 Provide the inorder, preorder and postorder traversals of the binary search tree of
Fig. 21.20.
49
28
83
18
40
71
97
11 19
32 44
69 72
92 99
Fig. 21.20 | Binary search tree with 15 nodes.
 
Search WWH ::




Custom Search