Waste less time on Facebook — follow Brilliant.
×

Graphs

Whether you're finding the shortest path between two locations or modeling a social network, graphs are are a critical tool for storing data and exploring connections.

Graph Fundamentals

         

For which of the following scenarios would a DAG (Directed acyclic graph) data structure be most appropriate?

Match the following graph with its corresponding adjacency matrix:

graph

graph

A

a

a

B

b

b

C

c

c

D

d

d

Consider traversing the graph below using a depth-first search, beginning with vertex \(1\). Which of the choices below lists vertices in the order they are visited in such a depth-first search traversal?

graph

graph

Consider traversing the graph below using breadth-first search, beginning with vertex \(1\). Which of the choices below lists vertices in the order they are visited in a breadth-first search traversal?

graph

graph

Which of the following choices describes the graph below?

image

image

×

Problem Loading...

Note Loading...

Set Loading...