Search Header Logo

14 - Red-Black Trees

Authored by Jason King

Computers

University

Used 98+ times

14 - Red-Black Trees
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following IS NOT a property of red-black trees?

every sentinel/leaf node has the same number of red ancestors
every sentinel/leaf node has the same number of black ancestors
the root of the tree must be black
every red node must have black children
every sentinel/leaf node is black

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Red-black trees use color to ensure…

O(h) recolorings and O(1) restructurings
O(1) recolorings and O(h) restructurings
O(log n) restructurings for each insert
O(log n) restructurings for each delete

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

When inserting a new entry into a red-black tree, the newly created node will be…

red, if the new node is not the root node
red, if the new node is the root node
black, if the new node is not the root node
the same color as its sibling

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

When inserting into a red-black tree, what condition might happen?

double-red
double-black
triple-red
triple-black

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What (2,4) tree scenario is represented by the following red-black subtree?

overflow

underflow

splay

transfer

fusion

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

When deleting a node from a red-black tree, what condition might happen?

double-black
double-red
triple-red
triple-black
too much!

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What corresponding (2,4) tree operation should be performed to resolve the double-black?

transfer

fusion

split

splay

merge

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?