Check if leaf has fewer than minimum required keys.
(self)
| 695 | return len(self.keys) |
| 696 | |
| 697 | def is_underfull(self) -> bool: |
| 698 | """Check if leaf has fewer than minimum required keys.""" |
| 699 | min_keys = (self.capacity - 1) // 2 |
| 700 | return len(self.keys) < min_keys |
| 701 | |
| 702 | def can_donate(self) -> bool: |
| 703 | """Check if leaf can give a key to a sibling (has more than minimum).""" |
no outgoing calls