Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Data Structures: Answer all questions regarding the following data structures wi

ID: 3684310 • Letter: D

Question

Data Structures:

Answer all questions regarding the following data structures with as much explanation as you can:

-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

-Which are valid trees? List all correct answers.
i,ii,v,vi
-Which are valid binary trees? List all correct answers.
i,ii,vi
-Which are valid binary search trees? List all correct answers.
ii,vi
-List the nodes of tree i. above in the order in which a level-order traversal would visit them.
i. 11,17,22,6,9,2,33
ii. 4,2,3
v. 7,3,4,8,1,2,5,9
vi. 5,7,6,9

-List the nodes of tree i. above in the order in which a pre-order traversal would visit them.
i. 11,17,6,2,22,9,33
ii. 4,2,3
vi. 5,7,6,9

-List the nodes of tree i. above in the order in which an in-order traversal would visit them.
i. 6,17,2,11,9,22,33
ii. 2,3,4
vi. 5,6,7,9

-List the nodes of tree i. above in the order in which a post-order traversal would visit them.
i. 6,2,17,9,33,22,11
ii. 3,2,4
vi. 6,9,7,5

we can make inorder, preorder and postorder of only binary tree.