Check if leaf can give a key to a sibling (has more than minimum).
(self)
| 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).""" |
| 704 | min_keys = (self.capacity - 1) // 2 |
| 705 | return len(self.keys) > min_keys |
| 706 | |
| 707 | def borrow_from_left(self, left_sibling: "LeafNode") -> None: |
| 708 | """Borrow the rightmost key-value from left sibling""" |
no outgoing calls