Skip to content

Commit d8b357f

Browse files
committed
format project
1 parent a9c4af1 commit d8b357f

File tree

20 files changed

+12
-31
lines changed

20 files changed

+12
-31
lines changed

src/3sum/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ func Test_threeSum(t *testing.T) {
2929
})
3030
}
3131
}
32-

src/add-binary/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@ func Test_addBinary(t *testing.T) {
2626
})
2727
}
2828
}
29-

src/backspace-string-compare/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ func Test_backspaceCompare(t *testing.T) {
2828
})
2929
}
3030
}
31-

src/binary-tree-postorder-traversal/solution.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ func main() {
5656
&TreeNode{8, nil, nil},
5757
&TreeNode{9, nil, nil}},
5858
nil}}
59-
fmt.Printf("%#v",postorderTraversal(tree))
59+
fmt.Printf("%#v", postorderTraversal(tree))
6060
}

src/binary-tree-preorder-traversal/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ func Test_preorderTraversal(t *testing.T) {
4040
})
4141
}
4242
}
43-

src/convert-bst-to-greater-tree/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ func Test_convertBST(t *testing.T) {
2828
})
2929
}
3030
}
31-

src/edit-distance/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@ func Test_minDistance(t *testing.T) {
2626
})
2727
}
2828
}
29-

src/find-the-difference/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ func Test_findTheDifference(t *testing.T) {
2828
})
2929
}
3030
}
31-

src/first-unique-character-in-a-string/solution_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,3 @@ func Test_firstUniqChar(t *testing.T) {
2727
})
2828
}
2929
}
30-
31-

src/fizz-buzz/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ func Test_fizzBuzz(t *testing.T) {
2828
})
2929
}
3030
}
31-

src/flatten-binary-tree-to-linked-list/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,3 @@ func Test_flatten(t *testing.T) {
3131
})
3232
}
3333
}
34-

src/implement-queue-using-stacks/solution_test.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ func Test_stack_Empty(t *testing.T) {
4747
}
4848
}
4949

50-
5150
func Test_stack_Peek(t *testing.T) {
5251
tests := []struct {
5352
name string
@@ -76,10 +75,10 @@ func TestConstructor(t *testing.T) {
7675
}{
7776
{
7877
"1",
79-
MyQueue{
80-
new(stack),
81-
new(stack),
82-
},
78+
MyQueue{
79+
new(stack),
80+
new(stack),
81+
},
8382
},
8483
}
8584
for _, tt := range tests {
@@ -154,4 +153,3 @@ func TestMyQueue_Empty(t *testing.T) {
154153
})
155154
}
156155
}
157-

src/jewels-and-stones/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ func Test_numJewelsInStones(t *testing.T) {
2828
})
2929
}
3030
}
31-

src/kth-largest-element-in-an-array/solution_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"testing"
55
)
66

7-
87
func Test_findKthLargest(t *testing.T) {
98
type args struct {
109
nums []int
@@ -31,4 +30,3 @@ func Test_findKthLargest(t *testing.T) {
3130
})
3231
}
3332
}
34-

src/letter-combinations-of-a-phone-number/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ func Test_letterCombinations(t *testing.T) {
2828
})
2929
}
3030
}
31-

src/lru-cache/solution.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
// LRUCache contains a map and a doubly linked list
99
type LRUCache struct {
1010
cap int // capacity
11-
l *list .List // doubly linked list
11+
l *list.List // doubly linked list
1212
m map[int]*list.Element // hash table for checking if list node exists
1313
}
1414

@@ -72,8 +72,8 @@ func (c *LRUCache) Put(key int, value int) {
7272
}
7373

7474
func main() {
75-
obj := Constructor(2) // nil
76-
obj.Put(1, 10) // nil, linked list: [1:10]
75+
obj := Constructor(2) // nil
76+
obj.Put(1, 10) // nil, linked list: [1:10]
7777
fmt.Println(obj.l)
7878
fmt.Println(obj.Get(1)) // -1, linked list: [4:40, 3:30]
7979
obj.Put(2, 20) // nil, linked list: [2:20, 1:10]

src/path-sum/solution_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ func Test_hasPathSum(t *testing.T) {
2828
})
2929
}
3030
}
31-

src/power-of-three/solution_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ func Test_isPowerOfThree(t *testing.T) {
2424
}
2525
})
2626
}
27-
}
27+
}

src/reverse-vowels-of-a-string/solution_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func Test_reverseVowels(t *testing.T) {
1313
}{
1414
{
1515
"1",
16-
args{s:"lEetcode"},
16+
args{s: "lEetcode"},
1717
"leotcedE",
1818
},
1919
}
@@ -24,4 +24,4 @@ func Test_reverseVowels(t *testing.T) {
2424
}
2525
})
2626
}
27-
}
27+
}

src/sudoku-solver/solution.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ func solve(board *[][]byte) bool {
1313
(*board)[i][j] = byte(k + '0')
1414
if solve(board) {
1515
return true
16-
} else {
17-
(*board)[i][j] = '.'
1816
}
17+
(*board)[i][j] = '.'
1918
}
2019
}
2120
return false

0 commit comments

Comments
 (0)