Language: Python · Sphere: programming · Category: Data Structures
Signature: () → None
AVL Tree Implementation
A self-balancing binary search tree where the heights of the two child subtrees of any node differ by at most one.
When it runs, avl tree guarantees sum(avl.inorder_traversal()) == 1275; avl.is_balanced(); avl.root.height <= 8 (proven by run).
Checkable constraints:
avl.is_balanced()avl.root.height <= 8avl.inorder_traversal() == list(range(1, 51))sum(avl.inorder_traversal()) == 1275avl.search(25) is True and avl.search(1) is True and (avl.search(50) is True)avl.search(100) is False and avl.search(0) is Falseavl.inorder_traversal() == list(range(1, 51))avl.is_balanced()
- Green-run: ✓ passes (re-run under the extractor's gate)
- Constraint strength: recovery (truth-pinned)
- Independent oracle: ✓ consensus — xlang (validator v1.9)
- Peer review: unreviewed
△ AURA Pattern Library — © Reality Optimizer