Find all possible paths from one node to another in Graph

preview_player
Показать описание
In this video I have shown how to find all possible simple paths from one source vertex to destination vertex using a simple Depth First Search, something which will be very useful in competitive programming.

Resources for Competitive Programming/Coding Interviews:

Subscribe for more DSA and placement preparation videos!
Рекомендации по теме
Комментарии
Автор

this super useful, however, how can make that function return the path instead of just printing it, when try to return under if src==dest it recorded one path. Any hints?

lllWiseManlll
Автор

Using DFS, check if there is a path exista between two nodes then return yes path exist ( iska python code mil sakta)..?

amarrukhsar
Автор

Can you tell again why did u use pop_back in dfs section?.

NutanKumari-ilvu
Автор

Can we use this concept for finding all possible topological sort in a DAG ?

israkulhaquetusher
Автор

brother speak clearly !!! your voice is low AND their is always a reason behind every line of code please explain it . Some lines of code are just wrote like "rata" mara ho 😶😶😶

sahilrane