flat-tree

crates.io version build status downloads docs.rs docs

Map a binary tree to a list. Adapted from mafintosh/flat-tree.

Usage

```rust extern crate flat_tree;

let parent = flat_tree::parent(0); println!("parent of 0 is {}", parent); ```

Why?

You can represent a binary tree in a simple flat list using the following structure:

text 3 1 5 0 2 4 6 ...

This module exposes a series of functions to help you build and maintain this data structure.

License

MIT OR Apache-2.0