Browse Source

goreturns -w .

content-update
Xavier Petit 4 years ago
parent
commit
7eef0eea96
No known key found for this signature in database
GPG Key ID: CA3F2B17E25ABD26
  1. 8
      go/tofix/func/inverttree/main.go
  2. 6
      go/tofix/func/merge/main.go
  3. 6
      go/tofix/func/sametree/main.go
  4. 3
      go/tofix/func/sortlist/main.go

8
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

6
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

6
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

3
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 {

Loading…
Cancel
Save