Answer the following questions regarding the following data structures: Which ar
ID: 3683758 • Letter: A
Question
Answer the following questions regarding the following data structures:
Which are valid trees? List all correct answers.
Which are valid binary trees? List all correct answers.
Which are valid binary search trees? List all correct answers.
List the nodes of tree i. above in the order in which a level-order traversal would visit them.
List the nodes of tree i. above in the order in which a pre-order traversal would visit them.
List the nodes of tree i. above in the order in which an in-order traversal would visit them.
List the nodes of tree i. above in the order in which a post-order traversal would visit them.
Explanation / Answer
(1) Valid trees: i,ii,v,vi
(2) binary trees: i,ii,vi
(3) binary search trees: ii
(4) level order: 11,17,22,6,2,9,33
(5) preorder: 11,17,6,2,22,9,33
(6) inorder: 6,17,2,11,9,22,33
(7) postorder: 6,2,17,9,33,22,11
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.