Search results for binary-search-tree

168 votes
17 answers
1
40 votes
5 answers
3
What is the maximum height of any AVL-tree with $7$ nodes? Assume that the height of a tree with a single node is $0$.$2$$3$$4$$5$
27 votes
5 answers
8
29 votes
4 answers
9
54 votes
7 answers
10
A binary search tree is used to locate the number $43$. Which of the following probe sequences are possible and which are not? Explain.$\begin{array}{llllll} \text{(a)} ...
8 votes
5 answers
12
27 votes
6 answers
13
31 votes
4 answers
15
How many distinct binary search trees can be created out of $4$ distinct keys?$5$$14$$24$$42$
33 votes
10 answers
16
81 votes
6 answers
17
Let $T(n)$ be the number of different binary search trees on $n$ distinct elements.Then $T(n) = \sum_{k=1}^{n} T(k-1)T(x)$, where $x$ is $n-k+1$$n-k$$n-k-1$$n-k-2$
53 votes
7 answers
18
25 votes
3 answers
19
Suppose the numbers $7, 5, 1, 8, 3, 6, 0, 9, 4, 2$ are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering o...
9 votes
3 answers
20
The average depth of a binary search tree is$O(n^{0.5})$$O(n)$$O(\log n)$$O(n \log n)$