Metadata-Version: 2.4
Name: sortery
Version: 0.2
Description-Content-Type: text/markdown
Dynamic: description
Dynamic: description-content-type

# Sortery 🌌

An ultra-optimized, hybrid data structure library written in Python that merges a **Doubly Linked List** with a **Hash-Mapped Lookup Table** and a **Binary Search Engine**. 

Sortery is designed to ingest highly fragmented, out-of-order data streaming with massive numeric gaps and organize it into a continuous sequential chain in real-time, executing over large volumes without standard brute-force performance bottlenecks.

## 🛠️ The Architecture

Standard sorting algorithms often require sorting the entire dataset from scratch or scanning linearly to position incoming elements. Sortery utilizes a multi-layered approach to handle dynamic data insertion efficiently:

1. **The Presentation Layer (Doubly Linked Nodes):** Data elements exist as discrete node objects scattered in memory, communicating strictly through bidirectional pointers (`.next` and `.prev`). This eliminates the array-shifting overhead during splicing operations.
2. **The Instant-Lookup Table (Hash Map):** A dictionary registers every node upon arrival, mapping raw values to their exact object locations in memory for instantaneous O(1) reference routing.
3. **The Algorithmic Navigator (Binary Search):** To bridge structural gaps between non-consecutive integers without resorting to linear scanning, Sortery triggers an internal binary-splitting search pattern (the classic number-guessing algorithm). This optimizes neighbor identification to logarithmic time scales.

## ⚡ Performance Metric

Sortery eliminates the worst-case scenario O(N²) brute-force lookup loop and maintains stability at scale:

* **Time Complexity (Insertion):** \(O(\log N)\) average case for boundary detection.
* **Extraction Complexity:** O(N) linear step to materialize sequential pointer links.
* **Stress Test Benchmarks:**
  * **1,000 randomized elements:** ~0.0018 seconds
  * **20,000 randomized elements:** ~0.0240 seconds
  * **100,000 highly chaotic elements:** **0.6030 seconds** 🚀

## 💻 Quick Start & Usage

You could install the package directly to your environment by using the python package manager
```python
pip install sortery
```
or you could download the wheel and install it locally
```python
pip install ~/YOUR_FILE_LOCATION
```
