CS2 QUIZZES QUESTIONS AND
ANSWERS WITH COMPLETE
SOLUTIONS 100% CORRECT RATED A+
The ArrayList class implements the ____ interface.
Stack
Queue
List
Set -ANSWER✔✔List
A stack is a collection that ____.
does not remember the order of elements but allows elements to be added in any
position.
remembers the order of elements, and allows elements to be added and removed
only at one end.
remembers the order of elements and allows elements to be inserted only at one
end and removed only at the other end.
,remembers the order of elements and allows elements to be inserted in any
position. -ANSWER✔✔remembers the order of elements, and allows elements to
be added and removed only at one end.
A queue is a collection that ____.
remembers the order of elements, and allows elements to be added and removed
only at one end.
remembers the order of elements and allows elements to be inserted only at one
end and removed only at the other end.
does not remember the order of elements but allows elements to be added in any
position.
remembers the order of elements and allows elements to be inserted in any
position. -ANSWER✔✔remembers the order of elements and allows elements to
be inserted only at one end and removed only at the other end.
A collection without an intrinsic order is called a ____.
queue
stack
,set
list -ANSWER✔✔set
A collection that allows items to be added only at one end and removed only at the
other end is called a ____.
set
stack
queue
list -ANSWER✔✔queue
A collection that allows speedy insertion and removal of already-located elements
in the middle of it is called a ____.
linked list
stack
set
, queue -ANSWER✔✔linked list
What is included in a linked list node?
I a reference to its neighboring nodes
II an array reference
III a data element
II only
I and III only
I only
II and III only -ANSWER✔✔I and III only
Which nodes need to be updated when we insert a new node to become the fourth
node from the beginning of a doubly-linked list?
The current third and fourth nodes.
ANSWERS WITH COMPLETE
SOLUTIONS 100% CORRECT RATED A+
The ArrayList class implements the ____ interface.
Stack
Queue
List
Set -ANSWER✔✔List
A stack is a collection that ____.
does not remember the order of elements but allows elements to be added in any
position.
remembers the order of elements, and allows elements to be added and removed
only at one end.
remembers the order of elements and allows elements to be inserted only at one
end and removed only at the other end.
,remembers the order of elements and allows elements to be inserted in any
position. -ANSWER✔✔remembers the order of elements, and allows elements to
be added and removed only at one end.
A queue is a collection that ____.
remembers the order of elements, and allows elements to be added and removed
only at one end.
remembers the order of elements and allows elements to be inserted only at one
end and removed only at the other end.
does not remember the order of elements but allows elements to be added in any
position.
remembers the order of elements and allows elements to be inserted in any
position. -ANSWER✔✔remembers the order of elements and allows elements to
be inserted only at one end and removed only at the other end.
A collection without an intrinsic order is called a ____.
queue
stack
,set
list -ANSWER✔✔set
A collection that allows items to be added only at one end and removed only at the
other end is called a ____.
set
stack
queue
list -ANSWER✔✔queue
A collection that allows speedy insertion and removal of already-located elements
in the middle of it is called a ____.
linked list
stack
set
, queue -ANSWER✔✔linked list
What is included in a linked list node?
I a reference to its neighboring nodes
II an array reference
III a data element
II only
I and III only
I only
II and III only -ANSWER✔✔I and III only
Which nodes need to be updated when we insert a new node to become the fourth
node from the beginning of a doubly-linked list?
The current third and fourth nodes.