Binary Trees & BST Flashcards

1
Q

What is a binary search tree (BST)?

A

Left subtree < root < right subtree.

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

What is the difference between a BST and a heap?

A

BST supports ordered access, Heap is optimized for min/max extraction.

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

What is an AVL tree?

A

Self-balancing BST.

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

What is the purpose of tree rotations in AVL trees?

A

Used in AVL trees to maintain balance.

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