[SOLVED] DataStructure -Hw3

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

 Trees And Traversals

 

Problem 1 : use a binary tree as an example of why each of the sentences below are wrong.

1.every binary tree is either complete or full.

2.every complete binary tree is also a full binary tree.

3.every full binary tree is also a complete binary tree.

4.no binary tree is both complete and full.

Problem 2 : Write the DFS , BFS, In-Order, Pre-Order and Post-Order traversal of each of the trees below.

1

Problem 3 : construct a Binary Search tree using the nodes listed below in the order given, and write the appropriate in-order , pre-order and post-order traversal of each tree.

  1. 12, 15, 3, 35, 21, 42, 14.
  2. 70, 11, 47, 81, 20, 61, 10, 12, 13, 62.

2

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.