Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 19139fe

Browse files
author
openset
committed
Update: not use dot imports
1 parent 2cdd5ac commit 19139fe

File tree

40 files changed

+131
-79
lines changed

40 files changed

+131
-79
lines changed

‎problems/add-one-row-to-tree/add_one_row_to_tree.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package problem623
22

33
import "github.com/openset/leetcode/internal/kit"
44

5+
// TreeNode - Definition for a binary tree node.
56
type TreeNode = kit.TreeNode
67

78
/**

‎problems/add-two-numbers-ii/add_two_numbers_ii.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package problem445
22

33
import "github.com/openset/leetcode/internal/kit"
44

5+
// ListNode - Definition for singly-linked list.
56
type ListNode = kit.ListNode
67

78
/**

‎problems/add-two-numbers/add_two_numbers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package problem2
22

33
import "github.com/openset/leetcode/internal/kit"
44

5+
// ListNode - Definition for singly-linked list.
56
type ListNode = kit.ListNode
67

78
/**

‎problems/balanced-binary-tree/balanced_binary_tree.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package problem110
22

33
import "github.com/openset/leetcode/internal/kit"
44

5+
// TreeNode - Definition for a binary tree node.
56
type TreeNode = kit.TreeNode
67

78
/**

‎problems/construct-string-from-binary-tree/construct_string_from_binary_tree.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ package problem606
33
import (
44
"strconv"
55

6-
. "github.com/openset/leetcode/internal/kit"
6+
"github.com/openset/leetcode/internal/kit"
77
)
88

9+
// TreeNode - Definition for a binary tree node.
10+
type TreeNode = kit.TreeNode
11+
912
/**
1013
* Definition for a binary tree node.
1114
* type TreeNode struct {

‎problems/construct-string-from-binary-tree/construct_string_from_binary_tree_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package problem606
33
import (
44
"testing"
55

6-
. "github.com/openset/leetcode/internal/kit"
6+
"github.com/openset/leetcode/internal/kit"
77
)
88

99
type caseType struct {
@@ -18,12 +18,12 @@ func TestTree2str(t *testing.T) {
1818
expected: "1(2(4))(3)",
1919
},
2020
{
21-
input: []int{1, 2, 3, NULL, 4},
21+
input: []int{1, 2, 3, kit.NULL, 4},
2222
expected: "1(2()(4))(3)",
2323
},
2424
}
2525
for _, tc := range tests {
26-
output := tree2str(SliceInt2TreeNode(tc.input))
26+
output := tree2str(kit.SliceInt2TreeNode(tc.input))
2727
if output != tc.expected {
2828
t.Fatalf("input: %v, output: %v, expected: %v", tc.input, output, tc.expected)
2929
}

‎problems/convert-sorted-array-to-binary-search-tree/convert_sorted_array_to_binary_search_tree.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package problem108
22

33
import "github.com/openset/leetcode/internal/kit"
44

5+
// TreeNode - Definition for a binary tree node.
56
type TreeNode = kit.TreeNode
67

78
/**

‎problems/cousins-in-binary-tree/cousins_in_binary_tree.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package problem993
22

3-
import . "github.com/openset/leetcode/internal/kit"
3+
import "github.com/openset/leetcode/internal/kit"
4+
5+
// TreeNode - Definition for a binary tree node.
6+
type TreeNode = kit.TreeNode
47

58
/**
69
* Definition for a binary tree node.

‎problems/cousins-in-binary-tree/cousins_in_binary_tree_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package problem993
33
import (
44
"testing"
55

6-
. "github.com/openset/leetcode/internal/kit"
6+
"github.com/openset/leetcode/internal/kit"
77
)
88

99
type caseType struct {
@@ -22,32 +22,32 @@ func TestIsCousins(t *testing.T) {
2222
expected: false,
2323
},
2424
{
25-
input: []int{1, 2, 3, NULL, 4, NULL, 5},
25+
input: []int{1, 2, 3, kit.NULL, 4, kit.NULL, 5},
2626
x: 5,
2727
y: 4,
2828
expected: true,
2929
},
3030
{
31-
input: []int{1, 2, 3, NULL, 4},
31+
input: []int{1, 2, 3, kit.NULL, 4},
3232
x: 2,
3333
y: 3,
3434
expected: false,
3535
},
3636
{
37-
input: []int{1, 2, 3, NULL, 4, 5},
37+
input: []int{1, 2, 3, kit.NULL, 4, 5},
3838
x: 4,
3939
y: 5,
4040
expected: true,
4141
},
4242
{
43-
input: []int{1, 2, 3, NULL, 4, 5},
43+
input: []int{1, 2, 3, kit.NULL, 4, 5},
4444
x: 5,
4545
y: 4,
4646
expected: true,
4747
},
4848
}
4949
for _, tc := range tests {
50-
output := isCousins(SliceInt2TreeNode(tc.input), tc.x, tc.y)
50+
output := isCousins(kit.SliceInt2TreeNode(tc.input), tc.x, tc.y)
5151
if output != tc.expected {
5252
t.Fatalf("input: %v, output: %v, expected: %v", tc.input, output, tc.expected)
5353
}

‎problems/delete-node-in-a-linked-list/delete_node_in_a_linked_list.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package problem237
22

3-
import . "github.com/openset/leetcode/internal/kit"
3+
import "github.com/openset/leetcode/internal/kit"
4+
5+
// ListNode - Definition for singly-linked list.
6+
type ListNode = kit.ListNode
47

58
/**
69
* Definition for singly-linked list.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /