Posted by zhimei Ding on July 24, 1999 at 15:08:34:
In Reply to: Re: Homework 9 posted by steve on July 23, 1999 at 15:33:04:
: : ooops... we should actually make (0,2) point to some arbitrary root? if this is this case, with (0,2) and (1,2), all three should be pointing to the same arbitrary root?
: I'm pretty sure that with the (0,2) and (1,2), you just create the first with 0 being the parent of 2. Then with (1, 2), you know 1~2 and 2~0, so 1 ~ 0, so you would have the root 0 with children 1 and 2.
Can't we have root 2 with child 0 and child 1?