__Problem 1:__

List out some of the application of tree data structure?

__Answer__

- Manipulation of Arithmetic expression
- Symbol Table construction
- Syntax analysis

__Problem 2__In a tree construction which is the suitable efficient data structures?

(a) Array

(b) Linked list

(c) Stack

(d) Queue

(e) None

__Answer:__

**(b) Linked list**

__Problem 3__

**How many different trees are possible with 10 nodes?**

__Answer__In general If there are n nodes then there exist

**2**different trees

^{n}-nhere n=10

so 2

^{10}-10==>1024-10=1014

So there are

**1014 different possible trees**available.

__Problem 4__**How many**

**differnt trees are possible with 3 nodes and show the possible trees?**

__Answer__here n=3

2

^{n}-n=2

^{3}-3=8-3=5

So a tree with 3 nodes have the maximum combination of

**5 different trees.**

**The different possible trees are shown below**

__Problem 5__**Consider the tree shown in figure**

- Which node is the root node?
- Which nodes are Leaves?
- What is the depth of the tree?
- What is the degree of the tree?
- For each node in the tree

(B) List the children

(C) List the siblings

(D) Compute the depth

(E) Compute the height

__Answer__

Good work

ReplyDeleteknowlegeable work

ReplyDelete