Bose Einstein
A data structure that efficiently partitions elements into left and right sets.
Overview
Partition<T> is a data structure that maintains a collection of elements partitioned into two sets: left and right. Elements can be efficiently moved between the sets, and the relative order within each set is not guaranteed to be preserved.
Features
- Efficient push and pop operations for both left and right sets
- Ability to move elements between partitions
- Drain iterators for consuming elements from either partition
- Specialized iterators for moving elements from one partition to another
- Raw parts access for advanced use cases
Example
use Partition;
License
This project is licensed under CC0-1.0.