
3 Dec
2007
3 Dec
'07
3:40 a.m.
Adrian Neumann wrote:
data Tree a = Leaf a | Node a [Tree a]
But now the assignments require more than a simple top-down traversal. For example: given a tree t and two nodes u,v, find the first common ancestor.
Well, this problem doesn't make much sense in Haskell. How do you specify the subtrees u and v in the first place? Regards, apfelmus