+ 1

Can anybody help me to write main function for this code..

I want to input bi-directed graph's vertices points and i want the results that the graph have any path to go from source vertex to destination vertex. Input: n = 6, edges = [[0,1],[0,2],[3,5],[5,4],[4,3]], source = 0, destination = 5 Output: false Explanation: There is no path from vertex 0 to vertex 5. Input: n = 3, edges = [[0,1],[1,2],[2,0]], source = 0, destination = 2 Output: true Explanation: There are two paths from vertex 0 to vertex 2: - 0 → 1 → 2 - 0 → 2 https://code.sololearn.com/cVsuxSK9Xczi/?ref=app

19th Dec 2022, 2:43 AM
filibuster
filibuster - avatar
2 Antworten
+ 2
Pls edit your question description and add the purpose of the code and an explanation of your difficulties
20th Dec 2022, 12:45 AM
Emerson Prado
Emerson Prado - avatar
+ 1
20th Dec 2022, 2:00 AM
filibuster
filibuster - avatar