Algorithm Designa67-longest-path-dag

Longest Path in DAG

20b49c6f-9f5f-430b-9c20-6e8a5058d98c.cC
1// Loading code...

Selected Submission

100 / 100
0.308s
4116 KB
BFS/DFSGraph
Time Comp.
O(V + E)
Space Comp.
O(V + E)
Readability
6/10

"The code performs a Depth-First Search (DFS) to find the maximum reachable value in a directed acyclic graph. It utilizes the in-degree of nodes to identify starting points for the DFS, and the algorithm explores paths to update the maximum reachable value."

History

AttemptPoints Time
Try #61005/2/2025
Try #51005/2/2025
Try #41005/2/2025
Try #3605/2/2025
Try #2605/2/2025
Try #1655/2/2025