Search Header Logo

YZV 201E - Recitation 12 Pre-Quiz

Authored by Doğukan Arslan

Fun

KG

Used 2+ times

YZV 201E - Recitation 12 Pre-Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the statements about binary search tree is FALSE?

Data is placed in the tree in a certain order.

Values in the left subtree should be bigger than the value in the root.

The right and left subtrees of a root node have the binary search tree property.

In the binary search tree, each data is located in only 1 node.

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which statement is FALSE, if we write the tree to the file in-order?

The data in the tree will be written to the file in alphabetical order.

When reading from the file and recreating tree, tree will be unbalanced.

"write_inorder” function will be more problematic than "write_preorder" when we want to recreate the tree from the file.

BSTs cannot be written in-order format to the file.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given a set of n distinct elements and an unlabelled binary tree with n nodes. How many ways can we match those?

0

1

n!

n

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following traversal outputs the data in sorted order in a BST?

Pre-order

In-order

Post-order

Level-order

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

The following numbers are inserted into an empty BST in the given order: 10, 1, 3, 5, 15, 12, 16. What is the height?

2

3

4

6

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?