Filters
Question type

Study Flashcards

Which statement is false?


A) A linked list is a linear collection of self-referential class objects called nodes connected by reference links.
B) A linked list is appropriate when the number of data elements to be represented in the data structure is unpredictable.
C) The java.util package contains class LinkedList.
D) By convention,the link reference in the last node of a list is set to null to mark the end of the list.

E) None of the above
F) B) and C)

Correct Answer

verifed

verified

Which statement is false?


A) In a tightly packed binary tree,each level contains about twice as many elements as the previous level.
B) When searching a tightly packed 1,000,000-element binary search tree,approximately 20 comparisons need to be made.
C) The level-order traversal of a binary tree visits the nodes of the tree row-by-row starting at the root node level.
D) Searching a binary tree for a value that matches a key value is slow for loosely packed trees.

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

The technique of implementing each stack method as a call to a List method is called __________.


A) delegation.
B) delimiting.
C) assigning.
D) shifting responsibility.

E) A) and B)
F) All of the above

Correct Answer

verifed

verified

Which statement about trees is false?


A) A tree is a nonlinear,two-dimensional data structure.
B) Each node in a tree contains two links.
C) The children of a node are called siblings.
D) A node with no children is called a leaf node.

E) C) and D)
F) All of the above

Correct Answer

verifed

verified

B

Which statement is false?


A) When a method call is made,the called method must know how to return to its caller,so the return address is pushed onto the program execution stack.
B) Stacks support recursive method calls in the same manner as conventional,nonrecursive method calls.
C) The program execution stack contains the space created for a method's global variables on each invocation of that method during a program's execution.
D) When a method returns to its caller,the memory for that method's local variables is popped off the stack and those variables are no longer known to the program.

E) B) and C)
F) B) and D)

Correct Answer

verifed

verified

A __________ class contains a reference member that refers to an object of the same class type.


A) self-determining.
B) self-pointing.
C) self-linking.
D) self-referential.

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

If no memory is available,keyword new throws an __________.


A) OutOfMemoryException.
B) OutOfMemoryEvent.
C) OutOfMemoryExhaustion.
D) OutOfMemoryError.

E) None of the above
F) All of the above

Correct Answer

verifed

verified

D

Which statement is false?


A) Linked lists are collections of data items "lined up in a row"insertions and deletions can be made anywhere in a linked list.
B) Insertions and deletions are made only at one end of a stack,its top.
C) Insertions and deletions are made only at one end of a queue,its tail.
D) Binary trees facilitate high-speed searching and sorting of data.

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

Usually a _________ indicates the end of a data structure.


A) backslash character.
B) forward slash character
C) null reference.
D) null pointer.

E) C) and D)
F) B) and C)

Correct Answer

verifed

verified

Queue nodes are removed only from the __________ of the queue,and are inserted only at the __________ of the queue.


A) tail,tail.
B) tail,head.
C) head,tail.
D) head,head.

E) All of the above
F) B) and D)

Correct Answer

verifed

verified

Java performs automatic __________ of objects that are no longer referenced in a program.


A) memory distribution.
B) garbage collection.
C) storage compression.
D) trash aggregation.

E) None of the above
F) B) and D)

Correct Answer

verifed

verified

Which is not a typical application of queues?


A) Routing packets in a computer network.
B) File server handling file access requests from many clients.
C) High-speed sorting.
D) Print spooling.

E) A) and B)
F) All of the above

Correct Answer

verifed

verified

A queue is a __________ data structure.


A) FOFI.
B) FIFO.
C) OFIF.
D) IFOF.

E) B) and D)
F) All of the above

Correct Answer

verifed

verified

A stack is a __________ data structure.


A) FILO.
B) FOLI.
C) LOFI.
D) LIFO.

E) None of the above
F) A) and B)

Correct Answer

verifed

verified

Which statement is false?


A) The shape of a binary search tree that corresponds to a set of data can vary,depending on the order in which the values are inserted into the tree.
B) A node can be inserted at any point in a binary search tree.
C) The process of creating a binary search tree actually sorts the data,and thus this process is called the binary tree sort.
D) The binary search tree facilitates duplicate elimination.

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

An isEmpty method you write to test whether a linked list is empty is called a __________ method.


A) predefined.
B) predicate.
C) preemption.
D) preorder.

E) B) and C)
F) A) and B)

Correct Answer

verifed

verified

B

Showing 1 - 16 of 16

Related Exams

Show Answer