HackerRank Trees Quiz-2

Question 1

Time: 00:00:00
Among which of the operations we perform in an AVL tree?

Insertion,Deletion,Transition

Insertion,Deletion,Transition

Rotation,Insertion,Transition

Rotation,Insertion,Transition

Insertion,Balancing,Rotation

Insertion,Balancing,Rotation

Insertion,Deletion,Rotation

Insertion,Deletion,Rotation

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
Which are the types of rotation in AVL trees?

LL,LR,RR

LL,LR,RR

LL,RL,RR

LL,RL,RR

LL,RR,LR,RL

LL,RR,LR,RL

LR,RL,RR,RLR,

LR,RL,RR,RLR,

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
What do you mean by RL rotation?

used when the new node is inserted to the right of left subtree

used when the new node is inserted to the right of left subtree

used when the new node is inserted to the left of left subtree

used when the new node is inserted to the left of left subtree

used when the new node has been inserted into right subtree

used when the new node has been inserted into right subtree

used when the new node is inserted to the left of the right subtree 

used when the new node is inserted to the left of the right subtree 

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
If balanced factor =1 in AVL Trees, then it reflects:-

 

The height of the left subtree of that node is one less than the height of it’s left subtree.

The height of the left subtree of that node is one less than the height of it’s left subtree.

The height of the right subtree of that node is one less than the height of it’s left subtree.

The height of the right subtree of that node is one less than the height of it’s left subtree.

The height of the left subtree of that node is one more than the height of it’s right subtree.

The height of the left subtree of that node is one more than the height of it’s right subtree.

The height of the right subtree of that node is one more than the height of it’s right subtree.

The height of the right subtree of that node is one more than the height of it’s right subtree.

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
These nodes, [ 15 , 18 , 12 , 8 , 54 , 5 , 14 , 13 , 9 , 60]., will be inserted in an AVL Tree in how many steps?

19

19

17

17

15

15

18

18

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
Re-balancing the nodes in an AVL Tree is known as:-

Sequencing

Sequencing

Rotation

Rotation

Balancing

Balancing

b and c

b and c

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
The internal node in B-Tree of order m must have:-

 

at least m-1 children.

at least m-1 children.

at least m/2 children and at most m children.

at least m/2 children and at most m children.

at most m/2 children

at most m/2 children

and at most m+1 children.

and at most m+1 children.

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
The non-leaf node in B-tree of order m can have:-

at most m non empty child and at least two child nodes

at most m non empty child and at least two child nodes

at most m non empty child

at most m non empty child

and at least two child nodes.

and at least two child nodes.

at least m non empty child  

at least m non empty child  

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
The minimum no of keys a B-tree(degree as t) can hold is

 

t-1

t-1

2t-1

2t-1

2(t-1)

2(t-1)

t-2  

t-2  

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
The maximum no of keys a B-tree(degree as t) can hold is

t-1

t-1

2t-1

2t-1

2(t-1)

2(t-1)

t-2

t-2

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]