In pseudo-code: 8 for each value i in a 9 for each node j in T 10 if degree = 1 11 then Insert edge into T 12 degree ← degree - 1 13 degree ← degree - 1 14 break At the end of this loop two nodes with degree 1 will remain (call them u, v).
У псевдокоді: 8 for each value i in a 9 for each node j in T 10 if degree = 1 11 then Insert edge into T 12 degree ← degree - 1 13 degree ← degree - 1 14 break Наприкінці цього циклу залишиться два вузли з ступенем 1 (називайте їх u, v).