Skip to content

q10ExistsPathP

solutions.q10ExistsPathP

Question 10

Given an undirected graph \(G(V,E)\) without self-loops, and a pair \((s,d)\) of source and destination vertices, determine if a path between them exists in the graph.

Functions:

Name Description
q10ExistsPathP

Args:

q10ExistsPathP(G, s, d)

Parameters:

Name Type Description Default
G Graph

Graph resolves into G.V and G.E.

required
s int

Index of the source vertex.

required
d int

Index of the destination vertex.

required