Leetcode 797. All Paths From Source to Target
Given a DAG as adjacency lists, enumerate all possible paths from source node 0 to target node nā1 and return each path as a list of node indices. This is typically solved with DFS/backtracking on the DAG (n ⤠15, so exponential output is acceptable).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.