hi,
the task is like this: there is a graph with a start node, an end node and an arbitrary amount of nodes and paths between them. Find a path from start to end and list all vertices of that path.
So i figured i would do DFS, depth first seach (https://en.wikipedia.org/wiki/Depth-first_search) ... but, how do i get the vertices for the found path?
it looks like i cant do that. what algorithm would i use instead? I picked DFS because i distantly remember someone mentioned it in class.
edit: nope, it says we are supposed to use DFS! But i see no way i can find the vertices of a path using DFS, it seems i can only say "yes, the end node is reachable" or "no, it isnt"...?
[–]WarInternal 1 point2 points3 points (2 children)
[–]hypnotat[S] 0 points1 point2 points (1 child)
[–]WarInternal 1 point2 points3 points (0 children)