11 tree
[$
2] = tree
[$
2] " " $
1;
13 tree
[$
1] = tree
[$
1] " " $
2;
19 candidate = first
(queue
);
22 if(candidate in processed
)
24 processed
[candidate
] =
1;
27 new_candidates = tree
[candidate
];
28 split(new_candidates
, tmp
);
34 leaves
[candidate
] =
1;