in DS edited by
1,022 views
0 votes
0 votes

What item is at the root after the following sequence of insertions into an empty splay tree :

$1, 11, 3, 10, 8, 4, 6, 5, 7, 9, 2, ?$

  1. $1$
  2. $2$
  3. $4$
  4. $8$
in DS edited by
1.0k views

2 Answers

2 votes
2 votes

1 comment

thanking you
0
0
0 votes
0 votes

A splay tree is a self-balanced tree in which the last access key is always in the root.

The final tree looks like this:

Option B is correct.

How splay tree insertion is done here, please refer to Splay tree insertion

edited by

Related questions