1: | i ← 2 |
2: | while i ≤ Length( ) do |
3: | im ← i − 1 |
4: | j ← i |
5: | while j ≤ Length( ) do |
6: | if IsIn( , ) then |
7: | ReplacePart( , ← MergeIn( , )) |
8: | j ← i |
9: | Drop( , ) |
10: | else if IsIn( , ) then |
11: | ReplacePart( , ← MergeIn( , )) |
12: | Drop( , ) |
13: | else |
14: | Leave unchanged |
15: | j ← j + 1 |
16: | end if |
17: | end while |
18: | i ← i + 1 |
19: | end while |
20: | return |