#how would one approach this if you can

1 messages · Page 1 of 1 (latest)

unborn raven
#

example output: C->B->A->D or C->B->D
thank you....also for the LC expert what difficulty level would this be

simple pier
#

This would be LC easy question if I am understanding it right.

You are given directed edges and now you want to reach from a source to a destination.
You need to mention the path that you need to take for the same right?

unborn raven
simple pier
#

If you want to find all the paths

#

If you need just one single path that's simple you just run dfs and return as soon as you get the path

unborn raven
#

Ahh it's a medium. Dang it, looked so easy yet so confusing. Thank you sm

#

can it be solved without data structure?

simple pier
#

You need knowledge of graphs to solve it