Deck 15: Graphs
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/29
Play
Full screen (f)
Deck 15: Graphs
1
A _________ is a nonlinear collection in which there is essentially no inherent organization to the elements in the collection.
A) Set
B) Tree
C) Graph
D) Stack
A) Set
B) Tree
C) Graph
D) Stack
Set
2
The implementation of the collection operations should not affect the way users _____________ the collection.
A) implement
B) document
C) interact with
D) none of the above
A) implement
B) document
C) interact with
D) none of the above
interact with
3
In the Java Collections API and throughout this text, __________ indicate both the underlying data structure and the collection.
A) Object names
B) Class names
C) Interfaces
D) Stereotypes
A) Object names
B) Class names
C) Interfaces
D) Stereotypes
Class names
4
The difference between a set and map is that a set stores the key and the data __________ while a map separates the key from the data and only stores the key and a reference to the data.
A) together
B) separately
C) in parallel
D) none of the above
A) together
B) separately
C) in parallel
D) none of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
5
In the Java Collections API, sets and maps are ___________ with a wide variety of implementations.
A) Object names
B) Class names
C) Interfaces
D) Stereotypes
A) Object names
B) Class names
C) Interfaces
D) Stereotypes
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
6
The time complexit of the linked implementation of a set would be O(____) if there were not a count variable in the implementation.
A) Log n
B) n
C) n log n
D) none of the above
A) Log n
B) n
C) n log n
D) none of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
7
The time complexity be for the add operation on an array implementation of a set would be O(_____) if there were not a count variable in the implementation.
A) Log n
B) n
C) n log n
D) none of the above
A) Log n
B) n
C) n log n
D) none of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
8
The time complexity of the add operation on a linked implementation would be O(____) if we chose to add at the end of the list instead of the front?
A) Log n
B) n
C) n log n
D) none of the above
A) Log n
B) n
C) n log n
D) none of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
9
A set is a nonlinear collection in which there is essentially no inherent ______ to the elements in the collection.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
10
The ______ of the collection operations should not affect the way users interact with the collection.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
11
In the Java Collections API and throughout this text, ______ indicate both the underlying data structure and the collection.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
12
The difference between a ______ and ______ is that a ______ stores the key and the data together while a ______ separates the key from the data and only stores the key and a reference to the data.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
13
In the Java Collections API, sets and maps are ______ with a wide variety of implementations.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
14
A set is a nonlinear collection in which there is essentially no inherent organization to the elements in the collection.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
15
The implementation of the collection operations will naturally affect the way users interact with the collection.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
16
In the Java Collections API and throughout this text, class names indicate both the underlying data structure and the collection.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
17
A set is a linear collection in which there is essentially no inherent organization to the elements in the collection.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
18
The difference between a set and map is that a set stores the key and the data together while a map separates the key from the data and only stores the key and a reference to the data.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
19
In the Java Collections API and throughout this text, class names are random.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
20
In the Java Collections API, sets and maps are interfaces with a wide variety of implementations.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
21
The time complexit of the linked implementation of a set would be O(log n) if there were not a count variable in the implementation.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
22
The time complexity be for the add operation on an array implementation of a set would be O(n) if there were not a count variable in the implementation.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
23
The time complexity of the add operation on a linked implementation would be O(n log n) if we chose to add at the end of the list instead of the front?
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
24
What would the time complexity be for the size operation if there were not a count variable?
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
25
What would the time complexity be for the add operation if there were not a count variable?
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
26
What do the LinkedSet and ArraySet classes have in common?
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
27
What would be the time complexity of the add operation if we chose to add at the end of the list instead of the front?
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
28
What is the difference between a set and a map?
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
29
What are the potential advantages of a map over a set?
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck