https://github.com/bcomnes/flattree
🌳 A series of go functions to map a binary tree to a list.
https://github.com/bcomnes/flattree
Last synced: about 1 year ago
JSON representation
🌳 A series of go functions to map a binary tree to a list.
- Host: GitHub
- URL: https://github.com/bcomnes/flattree
- Owner: bcomnes
- License: mit
- Created: 2018-02-18T00:20:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-16T22:55:42.000Z (about 7 years ago)
- Last Synced: 2025-03-29T19:11:12.491Z (about 1 year ago)
- Language: Go
- Homepage: https://godoc.org/github.com/bcomnes/flattree
- Size: 16.6 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🌳 flattree
[![Build Status][travis-img]][travis] [![Go Reportcard][goreport-img]][goreport] [![GoDoc][godoc-img]][godoc]
A series of functions to map a binary tree to a list. A port of [flat-tree][ft] 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] example on godoc.
## API
See [API][api] example on godoc.
## See also
- [mafintosh/flat-tree][ft]: The node module that this was ported from.
- [datrs/flat-tree][rs]: A port of the node module to rust.
- [mafintosh/print-flat-tree][print]: A node cli that can pretty print flat-trees.
[ft]: https://github.com/mafintosh/flat-tree
[godoc]: https://godoc.org/github.com/bcomnes/flattree
[godoc-img]: https://godoc.org/github.com/bcomnes/flattree?status.svg
[travis]: https://travis-ci.org/bcomnes/flattree
[travis-img]: https://travis-ci.org/bcomnes/flattree.svg?branch=master
[example]: https://godoc.org/github.com/bcomnes/flattree
[api]: https://godoc.org/github.com/bcomnes/flattree#pkg-index
[print]: https://github.com/mafintosh/print-flat-tree
[rs]: https://github.com/datrs/flat-tree
[goreport]: https://goreportcard.com/report/github.com/bcomnes/flattree
[goreport-img]: https://goreportcard.com/badge/github.com/bcomnes/flattree