← 返回 amazon 的题目列表Find Longest Path in DAG
类型:online_judge
amazon
Given a Directed Acyclic Graph (DAG), find the length of the longest path. Nodes are integers, and the graph is represented as an adjacency list.
Example
Input
{0: [1], 1: [2], 2: [3], 3: []}