14 - Red-Black Trees

14 - Red-Black Trees

University

9 Qs

quiz-placeholder

Similar activities

Linkedlist

Linkedlist

University

10 Qs

red black tree data structure

red black tree data structure

University

10 Qs

BCSC0006 Trees

BCSC0006 Trees

University

10 Qs

Typing words on keyboard (colours)

Typing words on keyboard (colours)

KG - Professional Development

11 Qs

Soal Photoshop Dasar 1

Soal Photoshop Dasar 1

1st Grade - University

11 Qs

Decrypt it! Level 2

Decrypt it! Level 2

University

10 Qs

Riset Operasi

Riset Operasi

University

10 Qs

Kuis 2 - ASD -A

Kuis 2 - ASD -A

University

10 Qs

14 - Red-Black Trees

14 - Red-Black Trees

Assessment

Quiz

Computers

University

Hard

Created by

Jason King

Used 98+ times

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

8.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

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

fusion

transfer

split

splay

merge

9.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of the following data structures has worst-case O(log n) runtime for map behaviors (put, get, remove)?

red-black trees

AVL trees

skip lists

splay trees

(2,4) trees