edited by
195 views
0 votes
0 votes

https://gateoverflow.in/18749/tifr2010-b-26 

1.In this question,  if 'a' min element and  'b' is max element in given tree then "n-1" additions will be required, then how "logn" additions ?

2. We can do it by finding inorder traversal in O(n) time but above solution from link is optimal i guess as its taking O(logn) but i am not getting it. 

Can someone explain both points 1 and 2.

edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
2
Surya Dhanraj asked Oct 24, 2017
491 views
An array a of unknown size is filled with special symbol let's say # . Time required to find the size of a is:Please give proper explanation
3 votes
3 votes
2 answers
3
dhruba asked Jun 5, 2023
1,043 views
In QuickSort algorithm, which of the following statements is NOT true regarding the partition process?a) Partition always divides the array into two non-empty subsets.b) ...