# What is the time complexity for the update cost on auxiliary trees?

Category: QuestionsWhat is the time complexity for the update cost on auxiliary trees?
Editor">Editor Staff asked 5 months ago

What is the time complexity for the update cost on auxiliary trees?

(a) O (log (log n))

(b) k-1 O (log n)

(c) K^2 O (log n)

(d) k+1 O (log (log n))

This interesting question is from Binary Trees topic in chapter Binary Trees of Data Structures & Algorithms I

This question was posed to me by my school principal while I was bunking the class.

Editor">Editor Staff answered 5 months ago

The correct option is (d) k+1 O (log (log n))

The explanation is: The update cost also is bounded by the upper bound. We perform one cut as well as one join operation for the auxiliary tree, so the total update cost for the auxiliary tree is found to be k+1 O (log (log n)).

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40702