tree - ActiveState ActiveGo 1.8
...

Package tree

import "golang.org/x/tour/tree"
Overview
Index

Overview ▾

type Tree

A Tree is a binary tree with integer values.

type Tree struct {
    Left  *Tree
    Value int
    Right *Tree
}

func New

func New(k int) *Tree

New returns a new, random binary tree holding the values k, 2k, ..., 10k.

func (*Tree) String

func (t *Tree) String() string