# HackerRank Trees Quiz-3

Question 1

Time: 00:00:00
How many steps will be taken to construct a B-Tree with the following elements:-

[20 , 30 , 35 , 85 , 5 , 10 , 40 , 55 , 60 , 38 , 25 , 7 , 78].

12

12

13

13

14

14

15

15

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

Start

Question 2

Time: 00:00:00
Which of the following operations are performed in a binary search tree?

Insertion,Deletion

Insertion,Deletion

Insertion,Deletion,Rotation

Insertion,Deletion,Rotation

Insertion,Deletion,Traversal

Insertion,Deletion,Traversal

All

All

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

Start

Question 3

Time: 00:00:00
The properties of a BST include:-

values of nodes (left subtree)<value(root node)

values of nodes (left subtree)<value(root node)

values of nodes (right subtree)<value(root node)

values of nodes (right subtree)<value(root node)

values of nodes (left subtree)=values of nodes (right subtree)

values of nodes (left subtree)=values of nodes (right subtree)

a and b

a and b

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

Start

Question 4

Time: 00:00:00
The direction of traversal for preorder is

anti-clockwise

anti-clockwise

clockwise

clockwise

sequential

sequential

b and c

b and c

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

Start

Question 5

Time: 00:00:00
The order of traversal in preorder,postorder and inorder includes:-

LRC, CLR,LCR

LRC, CLR,LCR

CLR, LRC,  LCR

CLR, LRC,  LCR

LRC, LCR,CLR

LRC, LCR,CLR

CLR,LCR,LRC

CLR,LCR,LRC

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

Start

Question 6

Time: 00:00:00
Using which of the following traversals, we cannot construct a tree?

Preorder,Postorder

Preorder,Postorder

Preorder,Inorder

Preorder,Inorder

Postorder,Inorder

Postorder,Inorder

All

All

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

Start

Question 7

Time: 00:00:00
What is the time complexity of searching in a binary tree?

0(nlog n)

0(nlog n)

0(n)

0(n)

0(log n)

0(log n)

0(2 log n)

0(2 log n)

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

Start

Question 8

Time: 00:00:00
The time complexity(worst-case) in BST for searching,insertion and deletion is:-

0(log n) for all

0(log n) for all

0(log n) for insertion and deletion, 0(n) for searching

0(log n) for insertion and deletion, 0(n) for searching

0(n) for insertion and deletion, 0(log n) for searching

0(n) for insertion and deletion, 0(log n) for searching

0(n) for all

0(n) for all

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

Start

Question 9

Time: 00:00:00
The representation of a binary tree can be in the form of:-

only sequential representation

only sequential representation

only Dynamic node representation

only Dynamic node representation

none

none

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

Start

Question 10

Time: 00:00:00
A binary tree is called a Perfect Binary Tree if:-

all the internal nodes have exactly 2 children.

all the internal nodes have exactly 2 children.

all the internal nodes have at most 2 children.

all the internal nodes have at most 2 children.

all the internal nodes have at least 2 children.

all the internal nodes have at least 2 children.

b and c

b and c

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