yep Flashcards

1
Q

What are the properties of red-black trees?

A
  • Every node must be black or red.
  • The root MUST be black
  • If a node is red, its children must be black.
  • Every leaf is NULL and both its children are black.
  • All simple paths from the node to descendant leaves contain the same number of BLACK nodes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

What is a complete binary tree?

A

binary tree such that every level of the tree has the maximum of nodes possible expect for the leaf level (deepest level)

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

What is a full binary tree?

A

All leaves have the same depth and every nonleaf node has two children

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

What are 2-3-4 trees?

A

self balance trees, internal nodes can have 2,3, or 4 children (1,2,3 elements or keys), with leaf nodes in sorted order,

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

How would you convert a 2-3-4 tree to a red black tree?

A

2- node is just a black node. 3nodes is a black node with red child. 4 node is a black node with 2 red children.

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

What are b tree’s?

A

node’s contaning multiple keys that ensure each node has min num of keys. max num of elements is twice the min. every leaf in a B tree MUST have same height/depth (balancing)

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

What are invariants in hashing, and why are they important?

A

properties or rules that remain unchanged during the execution of hashing algorithms.

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