Quiz 6 - Key concepts and predicted questions

Ace your homework & exams now with Quizwiz!

Map

A ____ is a collection of objects that can be retrieved using a unique key

set

A ____ is a unique collection of objects generally used to determine whether a particular element is a member of a set

Directed Graph

A _______ is a graph where the edges are ordered pairs of vertices

spanning tree

A _______ is a tree that includes all of the vertices of a graph and some, but possibly not all, of the edges.

Network

A _______, or weighted graph, is a graph with weights or costs associated with each edge

Minimum spanning tree

A ________ is a spanning tree where the sum of the weights of the edges is less than or equal to the sum of the weights for any other spanning tree for the same graph.

Cycle

A ______is a path in which the first and last vertices are the same, but none of the edges is repeated

Path

A ______is a sequence of edges that connects two vertices in a graph

Connected

A graph is ______if and only if the number of vertices in the breadth-first traversal is the same as the number of vertices in the graph, regardless of the starting vertex

c

A hashing function that maps each element to a unique position in the hash table is said to be ______ a. in constant time b. a HashSet c. a perfect hashing function d. HashCode

Undirected graph

An _______ is a graph where the pairings that represent the edges are unordered

Undirected tree

An ________ is a connected, acyclic, undirected graph with one element designated as the root.

Complete

An undirected graph is considered ______ if it has the maximum number of edges connecting vertices

Breadth first traversal

Behaves very much like a level-order traversal of a tree Uses a queue to manage the traversal

Depth first traversal

Behaves very much like the preorder traversal of a tree, but doesn't have a root node. Uses a stack to manage the traversal

b

Both TreeSet and TreeMap use a _______ a. AVL balanced binary search tree b. red-black balanced binary search tree c. binary search tree d. degenerate tree

True

In hashing, elements are stored in a hash table, and their location in the table is determined by a hashing function True or false

a

In the Java API, ____is built using an underlying _____. a. TreeSet, TreeMap b. TreeMap, TreeSet

a

The Java API treats trees as implementing ____rather than as ______ a. data structures, collections b. collections, data structures

b

The only difference between a depth-first traversal and a breadth-first traversal is that a depth first traversal uses a _____ instead of a ______ to manage the traversal. a. Queue, Stack b. Stack, Queue

Adjacent

Two vertices in a graph are ______ if there is an edge connecting them


Related study sets

Fundamentals for Nursing Exam 2: Lippincott Quiz Practice and Book Practice Questions

View Set

None for the Road exam questions (not the practice exam)

View Set

Chapter 11: Real Estate Financing Pt 1

View Set

L'empire néo-assyrien (934-610 avant J.-C.)

View Set

Chapter 7 Nutrition Book Questions

View Set

CH 13: Socioemotional Development

View Set