Skip to content

Commit

Permalink
day 348: remove logging from final answer
Browse files Browse the repository at this point in the history
  • Loading branch information
vaskoz committed Feb 11, 2020
1 parent 11d9427 commit 0ecfcdc
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions day348/problem_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package day348

import (
"log"
"testing"
)

Expand Down Expand Up @@ -78,8 +77,6 @@ func TestTernarySearchTree(t *testing.T) {
tree.Insert(word)
}

logTernaryTree(tree)

if !equalTernaryTree(tree, tc.tree) {
t.Errorf("Expected trees to be equal but they aren't")
}
Expand Down Expand Up @@ -114,27 +111,7 @@ func BenchmarkTernarySearchTree(b *testing.B) {
}
}

func logTernaryTree(a *TernarySearchTree) {
if a == nil {
log.Println("nil")
return
}

log.Println(string(a.letter))

log.Println("going left")
logTernaryTree(a.left)

log.Println("going middle")
logTernaryTree(a.middle)

log.Println("going right")
logTernaryTree(a.right)
}

func equalTernaryTree(a, b *TernarySearchTree) bool {
log.Println(a, b)

if a == nil && b == nil {
return true
} else if a != nil && b != nil {
Expand Down

0 comments on commit 0ecfcdc

Please sign in to comment.