Binary Trees & BST Flashcards
1
Q
What is a binary search tree (BST)?
A
Left subtree < root < right subtree.
2
Q
What is the difference between a BST and a heap?
A
BST supports ordered access, Heap is optimized for min/max extraction.
3
Q
What is an AVL tree?
A
Self-balancing BST.
4
Q
What is the purpose of tree rotations in AVL trees?
A
Used in AVL trees to maintain balance.