Metadata-Version: 2.4
Name: BalancedBstAvl
Version: 1.0.0
Summary: AVL tree (self-balancing binary search tree) implementation.
Author: BalancedBstAvl contributors
License: MIT License
        
        Copyright (c) 2026 Shinoryo
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Source, https://github.com/Shinoryo/BalancedBstAvl
Project-URL: Issues, https://github.com/Shinoryo/BalancedBstAvl/issues
Keywords: avl,bst,tree,data-structure
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Dynamic: license-file

# AVL Tree Library

A simple implementation of an AVL tree (self-balancing binary search tree). It stores values associated with keys and performs insertion, deletion, and search operations in $O(\log n)$ time.

## Installation

```bash
pip install BalancedBstAvl
```

## Usage

```python
from avltree import AVLTree

tree = AVLTree()
tree = tree.set(10, "a")
tree = tree.set(5, "b")
tree = tree.set(15, "c")

print(tree.find(10))
print(tree.get(5))
print(tree.items())

tree = tree.delete(10)
print(tree.items())
```

## Features

- Insert/Update keys: `set(x, value)` (inserts if not present, updates if exists)
- Delete keys: `delete(x)`
- Check key existence: `find(x)`
- Retrieve values: `get(x, default=None)`
- Traverse: `items()` (in ascending key order)

## Dependencies

- Runtime: None (Python standard library only)
- Development: `pytest` and others (install with `pip install -e .[dev]`)

## Supported Environments

- Python 3.9, 3.10, 3.11, 3.12, 3.13
- OS: Windows / macOS / Linux

## Development

```bash
pip install -e .[dev]
pytest
```

## License

MIT License
