Home | History | Annotate | Download | only in play

Lines Matching defs:Tree

3 // this binary tree comparison.
25 // A Tree is a binary tree with integer values.
26 type Tree struct {
27 Left *Tree
29 Right *Tree
32 // Walk traverses a tree depth-first,
34 func Walk(t *Tree, ch chan int) {
45 func Walker(t *Tree) <-chan int {
57 func Compare(t1, t2 *Tree) bool {
72 // New returns a new, random binary tree
74 func New(n, k int) *Tree {
75 var t *Tree
82 func insert(t *Tree, v int) *Tree {
84 return &Tree{nil, v, nil}