Binary Search Tree Quiz

Binary Search Tree Quiz

University

8 Qs

quiz-placeholder

Similar activities

Tree Data Structure

Tree Data Structure

University

10 Qs

Binary Tree

Binary Tree

University

12 Qs

Trees

Trees

University

10 Qs

MPS   INTERNAL 2 TEST

MPS INTERNAL 2 TEST

University

6 Qs

PDS - 04225 Balanced Trees - Chapter 7

PDS - 04225 Balanced Trees - Chapter 7

University

10 Qs

Trees

Trees

University

11 Qs

UNIT 3

UNIT 3

University

10 Qs

Binary Tree 2

Binary Tree 2

University

10 Qs

Binary Search Tree Quiz

Binary Search Tree Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Rejimoan R

Used 6+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Suppose we have numbers between 1 and 1000 in a binary search tree and want to search for the number 363. Which of the following sequence could not be the sequence of the node examined?

2, 252, 401, 398, 330, 344, 397, 363

924, 220, 911, 244, 898, 258, 362, 363

925, 202, 911, 240, 912, 245, 258, 363

2, 399, 387, 219, 266, 382, 381, 278, 363

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

In full binary search tree every internal node has exactly two children. If there are 100 leaf nodes in the tree, how many internal nodes are there in the tree?

25

49

99

101

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

If a node having two children is to be deleted from binary search tree, it is replaced by its

In-order predecessor


In-order successor

Pre-order predecessor

Pre-order successor

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

In a full binary tree, every internal node has exactly two children. A full binary tree with 2n+1 nodes contains

n leaf node

n internal nodes

n-1 leaf nodes

n-1 internal node

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about binary trees is NOT true?

Every binary tree has at least one node.

Every non-empty tree has exactly one root node.

Every node has at most two children

Every non-root node has exactly one parent.

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

If the two tree traversals are:

1) Inorder: DGBAHEICF

2) postorder: GDBHIEFCA

 

then the preorder tree traversal can be…

A-B-D-G-C-E-H-I-F

A-B-G-D-E-C-H-I-F

B-A-D-G-C-E-H-I-F

A-B-D-G-C-E-H-F-I

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

How many distinct binary search trees can be created out of 4 distinct keys?

14

24

5

42

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

We are given a set of n distinct elements and an unlabelled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree?

0

1

n!

1/n+1