Skip to content
Tech News
← Back to articles

Show HN: ChaosTree – A zero-dependency Java tree library (AVL,RBT,B-Tree,B+Tree)

read original more articles
Why This Matters

ChaosTree introduces a versatile Java library that implements multiple balanced search-tree data structures with a focus on performance and correctness validation. Its design aims to improve efficiency in large-scale data operations, making it relevant for developers seeking high-performance, reliable collection implementations.

Key Takeaways

What is ChaosTree?

ChaosTree is a Java Sorted Set/Map library built around multiple search-tree data structures, including AVL Trees, Red-Black Trees, B-Trees, and B+ Trees.

The library provides both Set and Map implementations, with APIs designed around the semantics of the JDK's NavigableSet , NavigableMap , SequencedSet , and SequencedMap contracts.

In addition to the standard collection APIs, ChaosTree provides specialized construction APIs for users who want direct control over the initial structure of N-ary trees, Do read

buildFromSorted(Iterator, factor)

importFlatMatrix(Object[][], factor)

These APIs allow users to control the target node occupancy through a configurable factor in the supported range [0.5, 1.0], while maintaining the structural invariants required by the underlying B-Tree/B+Tree design.

Correctness & Validation

ChaosTree is validated through multiple layers of testing:

Guava Testlib compatibility testing

... continue reading