After the insertion operation, is the resultant tree a splay tee?

Category: QuestionsAfter the insertion operation, is the resultant tree a splay tee?
Editor">Editor Staff asked 5 months ago

After the insertion operation, is the resultant tree a splay tee?
 
(a) true
 
(b) false
 
My question is taken from Splay Tree topic in portion Binary Trees of Data Structures & Algorithms I
 
This question was addressed to me in an online interview.

1 Answers
Editor">Editor Staff answered 5 months ago

Right option is (a) true
 
Easiest explanation – There is a zig-zag and right operation(zig) which gives the right hand side tree. refer splay operations for insertion in splay tree.


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