Which of the following are advantages of the first-child / next-sibling representation of trees?

  • A: faster execution
  • B: promotes family values
  • C: unlimited number of children
  • D: saves memory
  • E: C and D

    Answer: E

    C is true because first-child / next-sibling in effect gives each node a linked list of children; thus the number of children is unlimited. D is true because each node contains only 2 links, making it use less storage than a representation that stores a link for each child if there can be more than 2 children per node.

    Contents    Page-10    Prev    Next    Page+10    Index