Home | History | Annotate | Download | only in shootout

Lines Matching refs:depth

44 var n = flag.Int("n", 15, "depth")
51 func bottomUpTree(item, depth int) *Node {
52 if depth <= 0 {
55 return &Node{item, bottomUpTree(2*item-1, depth-1), bottomUpTree(2*item, depth-1)}
77 fmt.Printf("stretch tree of depth %d\t check: %d\n", stretchDepth, check)
81 for depth := minDepth; depth <= maxDepth; depth += 2 {
82 iterations := 1 << uint(maxDepth-depth+minDepth)
86 check += bottomUpTree(i, depth).itemCheck()
87 check += bottomUpTree(-i, depth).itemCheck()
89 fmt.Printf("%d\t trees of depth %d\t check: %d\n", iterations*2, depth, check)
91 fmt.Printf("long lived tree of depth %d\t check: %d\n", maxDepth, longLivedTree.itemCheck())