mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-05 08:27:30 +08:00
Fix go report
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question145 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question147 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question148 struct {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package leetcode
|
||||
|
||||
import "fmt"
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"fmt"
|
||||
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question160 struct {
|
||||
|
@ -3,7 +3,7 @@ package leetcode
|
||||
import (
|
||||
"container/heap"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
func Test_Problem173(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question199 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question203 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question206 struct {
|
||||
|
@ -3,7 +3,7 @@ package leetcode
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/template"
|
||||
"github.com/halfrost/leetcode-go/template"
|
||||
)
|
||||
|
||||
// 解法一 树状数组,时间复杂度 O(n log n)
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question222 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question226 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question230 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question234 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question235 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question236 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question237 struct {
|
||||
|
@ -74,7 +74,7 @@ Output: [5,-99]
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -2,10 +2,8 @@ package leetcode
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question257 struct {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type TreeNode = structures.TreeNode
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question297 struct {
|
||||
@ -31,12 +31,12 @@ func Test_Problem297(t *testing.T) {
|
||||
ans297{[]int{}},
|
||||
},
|
||||
{
|
||||
para297{[]int{1,2,3,-1,-1,4,5}},
|
||||
ans297{[]int{1,2,3,-1,-1,4,5}},
|
||||
para297{[]int{1, 2, 3, -1, -1, 4, 5}},
|
||||
ans297{[]int{1, 2, 3, -1, -1, 4, 5}},
|
||||
},
|
||||
{
|
||||
para297{[]int{1,2}},
|
||||
ans297{[]int{1,2}},
|
||||
para297{[]int{1, 2}},
|
||||
ans297{[]int{1, 2}},
|
||||
},
|
||||
}
|
||||
|
||||
@ -52,4 +52,4 @@ func Test_Problem297(t *testing.T) {
|
||||
fmt.Printf("【output】:%v \n", structures.Tree2Preorder(tree297.deserialize(serialized)))
|
||||
}
|
||||
fmt.Printf("\n\n\n")
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type TreeNode = structures.TreeNode
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/template"
|
||||
"github.com/halfrost/leetcode-go/template"
|
||||
)
|
||||
|
||||
//解法一 线段树,sumRange 时间复杂度 O(1)
|
||||
|
@ -1,6 +1,6 @@
|
||||
package leetcode
|
||||
|
||||
import "github.com/halfrost/LeetCode-Go/template"
|
||||
import "github.com/halfrost/leetcode-go/template"
|
||||
|
||||
// NumArray define
|
||||
type NumArray struct {
|
||||
|
@ -3,7 +3,7 @@ package leetcode
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/template"
|
||||
"github.com/halfrost/leetcode-go/template"
|
||||
)
|
||||
|
||||
// 解法一 线段树
|
||||
|
@ -3,7 +3,7 @@ package leetcode
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/template"
|
||||
"github.com/halfrost/leetcode-go/template"
|
||||
)
|
||||
|
||||
// 解法一 线段树,时间复杂度 O(n log n)
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question328 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question337 struct {
|
||||
|
@ -3,7 +3,7 @@ package leetcode
|
||||
import (
|
||||
"math/rand"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
@ -20,8 +20,10 @@ type Solution struct {
|
||||
head *ListNode
|
||||
}
|
||||
|
||||
/** @param head The linked list's head.
|
||||
Note that the head is guaranteed to be not null, so it contains at least one node. */
|
||||
/*
|
||||
- @param head The linked list's head.
|
||||
Note that the head is guaranteed to be not null, so it contains at least one node.
|
||||
*/
|
||||
func Constructor(head *ListNode) Solution {
|
||||
return Solution{head: head}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
func Test_Problem382(t *testing.T) {
|
||||
|
@ -61,7 +61,7 @@ package leetcode
|
||||
import (
|
||||
"math/rand"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question404 struct {
|
||||
|
@ -3,7 +3,7 @@ package leetcode
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// Interval define
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question437 struct {
|
||||
|
@ -53,7 +53,7 @@ Output: 3
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// ListNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question445 struct {
|
||||
|
@ -3,7 +3,7 @@ package leetcode
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/template"
|
||||
"github.com/halfrost/leetcode-go/template"
|
||||
)
|
||||
|
||||
// 解法一 归并排序 mergesort,时间复杂度 O(n log n)
|
||||
|
@ -2,10 +2,8 @@ package leetcode
|
||||
|
||||
import (
|
||||
"sort"
|
||||
)
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question508 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question513 struct {
|
||||
|
@ -3,10 +3,8 @@ package leetcode
|
||||
import (
|
||||
"math"
|
||||
"sort"
|
||||
)
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question515 struct {
|
||||
|
@ -3,7 +3,7 @@ package leetcode
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question530 struct {
|
||||
|
@ -45,7 +45,7 @@ package leetcode
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question538 struct {
|
||||
|
@ -70,7 +70,7 @@ Output: [7,9,4,10]
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question543 struct {
|
||||
|
@ -47,7 +47,7 @@ Output: 1
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/template"
|
||||
"github.com/halfrost/leetcode-go/template"
|
||||
)
|
||||
|
||||
// 解法一 并查集
|
||||
|
@ -1,9 +1,9 @@
|
||||
package leetcode
|
||||
|
||||
import "math"
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"math"
|
||||
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question563 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question572 struct {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question589 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question617 struct {
|
||||
|
@ -50,7 +50,7 @@ Output: [2,2]
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question623 struct {
|
||||
|
@ -68,7 +68,7 @@ v = 1d = 3Output:
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question637 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question653 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question662 struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question669 struct {
|
||||
|
@ -68,7 +68,7 @@ Output: [2]
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/template"
|
||||
"github.com/halfrost/leetcode-go/template"
|
||||
)
|
||||
|
||||
func findRedundantConnection(edges [][]int) []int {
|
||||
|
@ -3,7 +3,7 @@ package leetcode
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/template"
|
||||
"github.com/halfrost/leetcode-go/template"
|
||||
)
|
||||
|
||||
func fallingSquares(positions [][]int) []int {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -42,7 +42,7 @@ Find the node in the BST that the node's value equals val and return the subtree
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
// TreeNode define
|
||||
|
@ -1,6 +1,6 @@
|
||||
package leetcode
|
||||
|
||||
import "github.com/halfrost/LeetCode-Go/structures"
|
||||
import "github.com/halfrost/leetcode-go/structures"
|
||||
|
||||
// TreeNode define
|
||||
type TreeNode = structures.TreeNode
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/halfrost/LeetCode-Go/structures"
|
||||
"github.com/halfrost/leetcode-go/structures"
|
||||
)
|
||||
|
||||
type question701 struct {
|
||||
|
@ -57,7 +57,7 @@ Output: [4,2,7,1,3,5]
|
||||
```go
|
||||
package leetcode
|
||||
|
||||
import "github.com/halfrost/LeetCode-Go/structures"
|
||||
import "github.com/halfrost/leetcode-go/structures"
|
||||
|
||||
// TreeNode define
|
||||
type TreeNode = structures.TreeNode
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user