← 返回 bloomberg 的题目列表Find All Paths from Source to Target in DAG
类型:online_judge
bloomberg
Given a directed acyclic graph, return all paths from the source node to the target node in any order. The graph is given as a list of edges where the nodes are marked with numbers from 0 to n-1. The source node is 0, and the target node is n-1.
Example
Input
[[1,2],[3],[3],[]]