Pruning with Graphs as Lists
l
Example 1:
l
[ [a, b], [a, c],
[b, d]
,
[c, d]
, [c, e], [e, a] ]
==>
l
[
[a, b]
, [a, c], [c, e], [e, a]]
==>
l
[ [a, c], [c, e], [e, a] ]
(no leaves)
l
l
Example 2:
l
[ [a, b], [a, c],
[b, d]
,
[c, d]
,
[c, e]
]
==>
l
[
[a, b]
,
[a, c]
]
==>
l
[ ]