Изменения

Перейти к: навигация, поиск
Псевдокод
'''int''' componentsCount = 0
'''for''' i = 1\ldots .. n - 1
'''if''' '''not''' reachable[i]
''continue''
componentsCount++
component[i] = componentsCount
'''for''' j = i + 1\ldots .. n - 1
'''if''' '''not''' marked[i][j]
component[j] = componentsCount
200
правок

Навигация