Изменения

Перейти к: навигация, поиск

Алгоритм Дейкстры

4 байта добавлено, 06:16, 21 января 2011
Псевдокод
<tex>d \gets \infty</tex>
<tex>d[s] \gets 0</tex>
<tex>S \gets \emptysetvarnothing</tex> '''while''' <tex>V \setminus S \neq \emptysetvarnothing</tex>
'''do''' <tex>u \gets </tex> ''argmin''(<tex>v : v \in V \setminus S, d[v]</tex>)
<tex>S \gets S \cup \{u\}</tex>
Анонимный участник

Навигация