Test prep Flashcards

1
Q

Rotations on redblack tree left right

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Rotations on a red black tree right left

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Time complexity best case

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Time complexity worst case

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Max heap

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Min heap

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

identify the data structure

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Colour of root node in a red black tree

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the extra piece of storage on a red black tree node compared to a binary search tree node?

A

the node also holds a colour

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What it a binary search tree node and a red black tree node made up of ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 6 rules of a red black tree?

A
  1. every node is either red or black
  2. the root is always black
  3. new insertions are always red
    4.Every path can have 2 consecutive red nodes
  4. Nulls are black nodes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you work out the path of a black node

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a sentinel binary tree

A

A special Node object used to indicate an absent child or parent node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the p in a binary search tree node

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you work out the height of a binary tree

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you work out black height x

A
17
Q

What is the black height of this tree?…

A
18
Q

Has this Red Black tree been colour flipped or rotated?

A

Colour flipped

19
Q

Has this Red Black tree been colour flipped or rotated?

A