797 All Paths From Source to Target
1. Question
Example:
Input: [[1,2], [3], [3], []]
Output: [[0,1,3],[0,2,3]]
Explanation:
The graph looks like this:
0--->1
| |
v v
2--->3
There are two paths:
0 -> 1 ->3 and 0 -> 2 ->3.2. Implementation
3. Time & Space Complexity
Last updated