Binary Search Tree Quiz

Binary Search Tree Quiz

University

9 Qs

quiz-placeholder

Similar activities

AdvancedProgramming_intro

AdvancedProgramming_intro

University

10 Qs

PDS - 04225 Searching & Algorithm Analysis - Chapter 4

PDS - 04225 Searching & Algorithm Analysis - Chapter 4

University

10 Qs

Best searching

Best searching

University

12 Qs

6th March

6th March

University

10 Qs

Trees

Trees

University

10 Qs

Kuis Susulan ASD

Kuis Susulan ASD

University

10 Qs

PDS - 04225 Balanced Trees - Chapter 7

PDS - 04225 Balanced Trees - Chapter 7

University

10 Qs

Skip List Quizizz

Skip List Quizizz

9th Grade - University

12 Qs

Binary Search Tree Quiz

Binary Search Tree Quiz

Assessment

Quiz

Computers

University

Hard

Created by

REVATHY K

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a binary search tree?

A tree where the value of the left node is equal to the parent node

A tree where the value of the left node is smaller than the parent node and the value of the right node is greater than the parent node

A tree where the value of the left node is smaller than the parent node

A tree where the value of the left node is greater than the parent node

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is the inorder traversal helpful in a binary search tree?

It gives data in descending order

It gives data in ascending order

It gives data in level order

It gives data in random order

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the space complexity for deletion in a binary search tree?

O(n)

O(1)

O(log n)

O(n^2)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When is the inorder successor needed in the deletion of a node in a binary search tree?

When the node to be deleted is the root node

When the node to be deleted has only one child

When the node to be deleted has two children

When the node to be deleted is a leaf node

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity for search in a binary search tree in the best case?

O(n^2)

O(n)

O(1)

O(log n)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when a node to be deleted in a binary search tree has only one child?

The node is directly deleted

The node is replaced with its child and then the child is deleted

The node is replaced with its parent

The node is replaced with its sibling

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the space complexity for search in a binary search tree?

O(n)

O(1)

O(log n)

O(n^2)

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main advantage of a binary search tree?

It cannot store data in a hierarchical form

Searching an element is easy

Insertion and deletion operations are slower

Searching an element is difficult

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity for deletion in a binary search tree in the average case?

O(log n)

O(n)

O(n^2)

O(1)