Deck 6: Lists

Full screen (f)
exit full mode
Question
List collections can be categorized as ______, ________, or __________.

A) Ordered, unordered, indexed
B) Linked, array, interface
C) Double, single, array
D) None of the above
Use Space or
up arrow
down arrow
to flip the card.
Question
The elements of an _____________ have an inherent relationship defining their order.

A) Ordered list
B) Unordered list
C) Indexed list
D) None of the above
Question
The elements of an _____________ are kept in whatever order the client chooses.

A) Ordered list
B) Unordered list
C) Indexed list
D) None of the above
Question
An _______________ maintains a contiguous numeric index range for its elements.

A) Ordered list
B) Unordered list
C) Indexed list
D) None of the above
Question
Many common operations can be defined for all list types. The differences between them stem from how elements are __________.

A) Added
B) Removed
C) Found
D) None of the above
Question
An ___________ is an object that provides a means to iterate over a collection.

A) Search
B) Comparable
C) Iterator
D) toString
Question
Interfaces can be used to derive other interfaces. The child interface contains all ____________ of the parent.

A) Non-abstract methods
B) Abstract methods
C) Parameters
D) None of the above
Question
An interface name can be used to declare an object reference variable. An interface reference can refer to any object of any class that __________ the interface.

A) Calls
B) Implements
C) Associates
D) None of the above
Question
Interfaces allow us to make ____________ references, in which the method that is invoked is based on the particular object being referenced at the time.

A) Polymorphic
B) Multiple
C) Interface
D) None of the above
Question
Only __________objects can be stored in an ordered list.

A) Ordered
B) Polymorphic
C) Comparable
D) None of the above
Question
The Java Collections API contains _________ implementations of an indexed list.

A) Two
B) Three
C) Four
D) Five
Question
______ collections can be categorized as ordered, unordered, and indexed.
Question
The ______ of an ordered list have an inherent relationship defining their order.
Question
The elements of an unordered list are kept in whatever order the ______ chooses.
Question
An ______ list maintains a contiguous numeric index range for its elements.
Question
The differences between the various types of lists, ordered, unordered, and indexed, stem from how elements are ______.
Question
The iterator method returns an object of type ______.
Question
An ______ allows one to traverse the elements of a collection.
Question
Interfaces can be used to derive other interfaces. The ______ contains all abstract methods of the parent.
Question
An interface name can be used to declare an object reference variable. An interface reference can refer to any object of any class that ______ the interface.
Question
Interfaces allow us to make polymorphic references, in which the method that is invoked is based on the particular ________ being referenced at the time.
Question
Only Comparable objects can be stored in an ______ list.
Question
The Java Collections API contains ______ implementations of an indexed list.
Question
List collections can be categorized as ordered, unordered, and indexed.
Question
The elements of an ordered list do not have an inherent relationship defining their order.
Question
The elements of an unordered list are kept in whatever order the client chooses.
Question
An indexed list maintains a contiguous numeric index range for its elements.
Question
An iterator is an object that provides a means to iterate over a collection.
Question
Interfaces cannot be derived from other interfaces.
Question
Interfaces allow us to make polymorphic references, in which the method that is invoked is based on the type of the reference variable rather than the particular object being referenced at the time.
Question
Only Comparable objects can be stored in an ordered list.
Question
What is the difference between an indexed list, an ordered list, and an unordered list?
Question
What are the basic methods of accessing an indexed list?
Question
What are the additional operations required of implementations that are part of the Java Collections API framework?
Question
What are the trade-offs in space complexity between an ArrayList and a LinkedList?
Question
What are the trade-offs in time complexity between an ArrayList and a LinkedList?
Question
What is the time complexity of the contains operation and the find operation for both implementations?
Question
What effect would it have if the LinkedList implementation were to use a singly linked list instead of a doubly linked list?
Question
Why is the time to increase the capacity of the array on an add operation considered negligible for the ArrayList implementation?
Question
What is an iterator and why is it useful for ADTs?
Question
Why was an iterator not appropriate for stacks and queues but it is appropriate for lists?
Question
Why is a circular array implementation not as attractive as an implementation of a list as it was for a queue?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/42
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 6: Lists
1
List collections can be categorized as ______, ________, or __________.

A) Ordered, unordered, indexed
B) Linked, array, interface
C) Double, single, array
D) None of the above
Ordered, unordered, indexed
2
The elements of an _____________ have an inherent relationship defining their order.

A) Ordered list
B) Unordered list
C) Indexed list
D) None of the above
Ordered list
3
The elements of an _____________ are kept in whatever order the client chooses.

A) Ordered list
B) Unordered list
C) Indexed list
D) None of the above
Unordered list
4
An _______________ maintains a contiguous numeric index range for its elements.

A) Ordered list
B) Unordered list
C) Indexed list
D) None of the above
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
5
Many common operations can be defined for all list types. The differences between them stem from how elements are __________.

A) Added
B) Removed
C) Found
D) None of the above
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
6
An ___________ is an object that provides a means to iterate over a collection.

A) Search
B) Comparable
C) Iterator
D) toString
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
7
Interfaces can be used to derive other interfaces. The child interface contains all ____________ of the parent.

A) Non-abstract methods
B) Abstract methods
C) Parameters
D) None of the above
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
8
An interface name can be used to declare an object reference variable. An interface reference can refer to any object of any class that __________ the interface.

A) Calls
B) Implements
C) Associates
D) None of the above
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
9
Interfaces allow us to make ____________ references, in which the method that is invoked is based on the particular object being referenced at the time.

A) Polymorphic
B) Multiple
C) Interface
D) None of the above
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
10
Only __________objects can be stored in an ordered list.

A) Ordered
B) Polymorphic
C) Comparable
D) None of the above
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
11
The Java Collections API contains _________ implementations of an indexed list.

A) Two
B) Three
C) Four
D) Five
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
12
______ collections can be categorized as ordered, unordered, and indexed.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
13
The ______ of an ordered list have an inherent relationship defining their order.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
14
The elements of an unordered list are kept in whatever order the ______ chooses.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
15
An ______ list maintains a contiguous numeric index range for its elements.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
16
The differences between the various types of lists, ordered, unordered, and indexed, stem from how elements are ______.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
17
The iterator method returns an object of type ______.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
18
An ______ allows one to traverse the elements of a collection.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
19
Interfaces can be used to derive other interfaces. The ______ contains all abstract methods of the parent.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
20
An interface name can be used to declare an object reference variable. An interface reference can refer to any object of any class that ______ the interface.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
21
Interfaces allow us to make polymorphic references, in which the method that is invoked is based on the particular ________ being referenced at the time.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
22
Only Comparable objects can be stored in an ______ list.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
23
The Java Collections API contains ______ implementations of an indexed list.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
24
List collections can be categorized as ordered, unordered, and indexed.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
25
The elements of an ordered list do not have an inherent relationship defining their order.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
26
The elements of an unordered list are kept in whatever order the client chooses.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
27
An indexed list maintains a contiguous numeric index range for its elements.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
28
An iterator is an object that provides a means to iterate over a collection.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
29
Interfaces cannot be derived from other interfaces.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
30
Interfaces allow us to make polymorphic references, in which the method that is invoked is based on the type of the reference variable rather than the particular object being referenced at the time.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
31
Only Comparable objects can be stored in an ordered list.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
32
What is the difference between an indexed list, an ordered list, and an unordered list?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
33
What are the basic methods of accessing an indexed list?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
34
What are the additional operations required of implementations that are part of the Java Collections API framework?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
35
What are the trade-offs in space complexity between an ArrayList and a LinkedList?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
36
What are the trade-offs in time complexity between an ArrayList and a LinkedList?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
37
What is the time complexity of the contains operation and the find operation for both implementations?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
38
What effect would it have if the LinkedList implementation were to use a singly linked list instead of a doubly linked list?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
39
Why is the time to increase the capacity of the array on an add operation considered negligible for the ArrayList implementation?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
40
What is an iterator and why is it useful for ADTs?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
41
Why was an iterator not appropriate for stacks and queues but it is appropriate for lists?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
42
Why is a circular array implementation not as attractive as an implementation of a list as it was for a queue?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 42 flashcards in this deck.