Created
May 8, 2018 18:14
-
-
Save arafatkatze/60e199ae56f7b31efdf5a8e7afe30c5c to your computer and use it in GitHub Desktop.
An example of Maps in Dataviz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
rbt "github.com/Arafatk/dataviz/trees/redblacktree" | |
) | |
func main() { | |
tree := rbt.NewWithIntComparator() | |
tree.Put(5, "e") | |
tree.Put(6, "f") | |
tree.Put(7, "g") | |
tree.Put(3, "c") | |
tree.Put(4, "d") | |
tree.Put(1, "x") | |
tree.Put(2, "b") | |
tree.Put(1, "a") //overwrite | |
tree.Visualizer("out.png") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment