Module arena_bst

Source
Expand description

A safe, arena-based (indexed) binary search tree (BST)

§About

A binary search tree is a binary tree where the value of each node’s child is less than or greater than its parent. Left children are less than their parents, and right children are greater than their parents.

Due to common usage when implementing sorted map and set structures, this implementation does not accept duplicate entries.

§Design

The design uses a flat, Vec-backed structure with iterative navigation. This arena-allocated design provides robust, performant operations while keeping runtime checks to a minimum. The goal of this approach is to avoid unnecessary overhead with recursive operations and extra heap allocations, making it suitable for low-spec environments.

§Example

Structs§

BinSearchTree
InOrderIter