Graph Theory37 sections · 1633 units
Open in CourseQuiz: DP Details
Knowledge check
Check Your Understanding
Longest path DP in a DAG: dp[v] = 1 + max(dp[u]) for edges . What should dp[source] be initialized to?
- A. (we want maximum)
- B.Undefined until computed
- C. (source is one node)
- D. (source contributes no edges yet)