i have been given the tree below i need to use some funcations to mulitpuliate the tree
these funcations are
Root: BT->N, where Root(t)=the root of an non empty tree t
Left: BT->BT where Left(t) = the left sub tree of an non empty tree t
Right BT-> Where Right(t) = the right sub tree of an non empty tree t
Make: BT x N x BT->BT, where Make (t,n,s) = the thre with root n, left subtree t and right sub tree s
i have been draw the tree MAKE(Left(right(s)),Root(Left(s)),Right(Left(s)))Code:d / \ e a / / \ h f c / \ b a
i have come up with the answer as this, is this correct
Code:d / a / \ f c / \ d e / / \ e h a / \ h a / \ / \ b a f c
is this correct
many thanks


LinkBack URL
About LinkBacks