Awesome
🌳 flattree
A series of functions to map a binary tree to a list. A port of flat-tree to go.
Install
go get github.com/bcomnes/flattree
Usage
You can represent a binary tree in a simple flat list using the following structure
3
1 5
0 2 4 6 ...
See Godoc example on godoc.
API
See API example on godoc.
See also
- mafintosh/flat-tree: The node module that this was ported from.
- datrs/flat-tree: A port of the node module to rust.
- mafintosh/print-flat-tree: A node cli that can pretty print flat-trees.