This shows you the differences between two versions of the page.
pa:laboratoare:laborator-09 [2025/04/27 19:10] darius.neatu [Task-2: Johnson] |
pa:laboratoare:laborator-09 [2025/05/21 17:19] (current) matei.mantu fix typo |
||
---|---|---|---|
Line 199: | Line 199: | ||
Johnson(G=(nodes, adj)) { | Johnson(G=(nodes, adj)) { | ||
// STEP 1: Compute adjustment distances h (using Bellmand-Ford). | // STEP 1: Compute adjustment distances h (using Bellmand-Ford). | ||
- | has_cycle, h = ComputerH(G); | + | has_cycle, h = ComputeH(G); |
if (has_cycle) { | if (has_cycle) { | ||
return true, null, null; | return true, null, null; |