Recent questions tagged tree

0 0 votes
1 1 answer
575
575 views
ugc
3 3 votes
3 answers 3 answers
1.5k
1.5k views
Insert the given values in the order in initially empty $\text{AVL}$ tree.$\text{34,21,10,27,24,43,15,6}$What is the value at the root of the tree$?$
32 32 votes
11 11 answers
7.4k
7.4k views
Let $T$ be a tree of $n$ nodes. Consider the following algorithm, that constructs a sequence of leaves $u_{1}, u_{2}...$. Let $u_{1}$ be some leaf of tree. Let $u_{2}$be ...
12 12 votes
9 answers 9 answers
24.6k
24.6k views
How many different trees are there with four nodes $\text{A, B, C}$ and $\text{D}?$$30$$60$$90$$120$
0 0 votes
2 2 answers
1.3k
1.3k views
The maximum number of nodes in a B+ tree with order 4 and height 6 are ____________I think it should be $1+4+4^{2}+4^{3}+4^{4}+4^{5}+4^{6}$= >$\frac{4^{7}-1}{4-1}$=>5461
5 5 votes
1 answers 1 answer
4.3k
4.3k views
How many edges are there in a forest of t-trees containing a total of n vertices ?n + tn – tn ∗ tnt
2 2 votes
4 answers 4 answers
8.6k
8.6k views
Suppose that someone starts with a chain letter. Each person who receives the letter is asked to send it on to $4$ other people. Some people do this, while some do not se...
20 20 votes
3 answers 3 answers
15.8k
15.8k views
A $3-\text{ary}$ tree is a tree in which every internal node has exactly three children. Use induction to prove that the number of leaves in a $3-\text{ary}$ tree with $n...
74 74 votes
12 answers 12 answers
33.5k
33.5k views
Consider the pseudocode given below. The function $DoSomething()$ takes as argument a pointer to the root of an arbitrary tree represented by the $leftMostChild-rightSibl...
66 66 votes
9 answers 9 answers
27.1k
27.1k views
Consider the following rooted tree with the vertex labeled $P$ as the root:The order in which the nodes are visited during an in-order traversal of the tree is$\text{SQPT...
42 42 votes
12 answers 12 answers
21.3k
21.3k views
A complete $n$-ary tree is one in which every node has $0$ or $n$ sons. If $x$ is the number of internal nodes of a complete $n$-ary tree, the number of leaves in it is g...
46 46 votes
5 answers 5 answers
26.6k
26.6k views
Which of the following statements is false? A tree with a $n$ nodes has $(n – 1)$ edges A labeled rooted binary tree can be uniquely constructed given its postorder and p...
33 33 votes
9 answers 9 answers
31.0k
31.0k views
In a complete $k$-ary tree, every internal node has exactly $k$ children. The number of leaves in such a tree with $n$ internal node is:$nk$$(n-1)k + 1$$n(k-1) +1$$n(k-1)...
43 43 votes
10 answers 10 answers
34.6k
34.6k views
A complete $n-ary$ tree is a tree in which each node has $n$ children or no children. Let $I$ be the number of internal nodes and $L$ be the number of leaves in a complet...
31 31 votes
3 answers 3 answers
10.4k
10.4k views
Level order traversal of a rooted tree can be done by starting from the root and performingpreorder traversalin-order traversaldepth first searchbreadth first search
52 52 votes
8 answers 8 answers
40.3k
40.3k views
The number of leaf nodes in a rooted tree of n nodes, with each node having $0$ or $3$ children is:$\frac{n}{2}$$\frac{(n-1)}{3}$$\frac{(n-1)}{2}$$\frac{(2n+1)}{3}$
41 41 votes
5 answers 5 answers
15.0k
15.0k views
A $2-3$ tree is such thatAll internal nodes have either $2$ or $3$ childrenAll paths from root to the leaves have the same lengthThe number of internal nodes of a $2-3$ t...