diff --git a/go/tofix/func/inverttree/main.go b/go/tofix/func/inverttree/main.go index 860449855..43da99db1 100644 --- a/go/tofix/func/inverttree/main.go +++ b/go/tofix/func/inverttree/main.go @@ -1,5 +1,12 @@ package correct +import ( + "fmt" + "io" + "math/rand" + "strconv" +) + type TNode struct { Val int Left *TNode @@ -22,7 +29,6 @@ func InvertTree(root *TNode) *TNode { return root } - type stuNode = TNode type solNode = correct.TNode diff --git a/go/tofix/func/merge/main.go b/go/tofix/func/merge/main.go index a8f7eefb3..f769d1217 100644 --- a/go/tofix/func/merge/main.go +++ b/go/tofix/func/merge/main.go @@ -1,5 +1,10 @@ package correct +import ( + "math/rand" + "strconv" +) + type TreeNodeM struct { Left *TreeNodeM Val int @@ -19,7 +24,6 @@ func MergeTrees(t1 *TreeNodeM, t2 *TreeNodeM) *TreeNodeM { return t1 } - type stuTreeNode = TreeNodeM type solTreeNode = correct.TreeNodeM diff --git a/go/tofix/func/sametree/main.go b/go/tofix/func/sametree/main.go index 1378d79ef..ed34e1ad3 100644 --- a/go/tofix/func/sametree/main.go +++ b/go/tofix/func/sametree/main.go @@ -1,5 +1,10 @@ package correct +import ( + "math/rand" + "strconv" +) + type TreeNodeL struct { Left *TreeNodeL Val int @@ -23,7 +28,6 @@ func checkIfEq(t1 *TreeNodeL, t2 *TreeNodeL) bool { return t1.Val == t2.Val && checkIfEq(t1.Right, t2.Right) && checkIfEq(t1.Left, t2.Left) } - type stuTreeNode = TreeNodeL type solTreeNode = correct.TreeNodeL diff --git a/go/tofix/func/sortlist/main.go b/go/tofix/func/sortlist/main.go index a7eefbd20..9442a61d7 100644 --- a/go/tofix/func/sortlist/main.go +++ b/go/tofix/func/sortlist/main.go @@ -1,5 +1,7 @@ package correct +import "strconv" + type Nodelist struct { Data int Next *Nodelist @@ -32,7 +34,6 @@ func moveValue(l *Nodelist, cmp func(a, b int) bool) *Nodelist { return ret } - func listToString4(n *correct.Nodelist) (res string) { it := n for it != nil {