• recategorized by
577 views

1 Answer

0 0 votes
I think,
a. O(n^2)
b. O(nlogn)
Position:
Show:

Related questions

2 2 votes
1 1 answer
1.0k
1.0k views
eyeamgj asked Jun 19, 2018
1,020 views
Given two inputs bst and min heap tree with $n$ nodes .To get the sorted order which is better and how much time?In the solution for min heap they first used build heap t...
2 2 votes
3 3 answers
409
409 views
Shubham Sharma 2 asked Sep 9, 2025
409 views
Which of the following is $\text{TRUE}?$The cost of searching an AVL tree is $\theta(\log n)$ but that of binary search is $0(n)$The cost of searching an AVL tree in $\th...
1 1 vote
0 0 answers
151
151 views
Shubham Sharma 2 asked Jul 24, 2025
151 views
What is the time complexity for searching an element in a balanced Binary Search Tree?$\text{O}(1)$$\text{O}(\log n)$$\text{O}(n)$$\text{O}(n \log n)$ 
2 2 votes
1 1 answer
473
473 views
Shubham Sharma 2 asked Jun 12, 2025
473 views
Let $R$ be the root of a balanced binary search tree having $n$ nodes, where each node contains an integer, a pointer to its left child and a pointer to its right child. ...