Learning Objectives Exs 51 55 Student Shall Able Write Generic Binary Tree Class Shall Abl Q37273906

Learning Objectives for Exs. 5.1-5.5: The student shall be ableto write a generic binary tree class and shall be able to explainthe characteristics of binary trees.

5.1 Consider this binary tree.(a) List the descendants of node 8.(b) List the ancestors of 1. (c)List the leaf nodes. (d) List the internalnodes.

4 5

4 5 Show transcribed image text 4 5


Answer


(a) List the descendants of node 8.5, 6, 2, 9 (b) List the ancestors of 1.3, 7 (c) List the leaf nodes.5, 9, 1, 4 (d) List the internal nodes.7, 8, 3, 6, 2,

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.