130
правок
Изменения
→Пример работы алгоритма для n = 3
=== Пример работы алгоритма для n = 3 ===
*<tex> p = \{1, 2, \textbf{3}\}\;\;\;d = \{</tex>←\leftarrow, ←\leftarrow, ←<tex>\leftarrow\}</tex>*<tex> p = \{1, \textbf{3}, 2\}\;\;\;d = \{</tex>←\leftarrow, ←\leftarrow, ←<tex>\leftarrow\}</tex>*<tex> p = \{3, 1, \textbf{2}\}\;\;\;d = \{</tex>←\leftarrow, ←\leftarrow, ←<tex>\leftarrow\}</tex>*<tex> p = \{\textbf{3}, 2, 1\}\;\;\;d = \{</tex>→\to, ←\leftarrow, ←<tex>\leftarrow\}</tex>*<tex> p = \{2, \textbf{3}, 1\}\;\;\;d = \{</tex>←\leftarrow, →\to, ←<tex>\leftarrow\}</tex>*<tex> p = \{2, 1, 3\}\;\;\;d = \{</tex>←\leftarrow, ←\leftarrow, →<tex>\to\}</tex>
=== Псевдокод ===