Skip to content

Commit 2b4b2e6

Browse files
aQuaaQua
aQua
authored and
aQua
committed
leetcode add 657~660
1 parent 78f4503 commit 2b4b2e6

File tree

12 files changed

+236
-0
lines changed

12 files changed

+236
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# [657. Judge Route Circle](https://leetcode.com/problems/judge-route-circle/)
2+
3+
## 题目
4+
5+
6+
## 解题思路
7+
8+
9+
## 总结
10+
11+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package Problem0657
2+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package Problem0657
2+
3+
import (
4+
"testing"
5+
"fmt"
6+
7+
"github.com/stretchr/testify/assert"
8+
)
9+
10+
type question struct {
11+
para
12+
ans
13+
}
14+
15+
// para 是参数
16+
// one 代表第一个参数
17+
type para struct {
18+
one string
19+
}
20+
21+
// ans 是答案
22+
// one 代表第一个答案
23+
type ans struct {
24+
one string
25+
}
26+
27+
func Test_Problem0657(t *testing.T) {
28+
ast := assert.New(t)
29+
30+
qs := []question{
31+
32+
question{
33+
para{""},
34+
ans{""},
35+
},
36+
37+
// 如需多个测试,可以复制上方元素。
38+
}
39+
40+
for _, q := range qs {
41+
a, p := q.ans, q.para
42+
fmt.Printf("~~%v~~\n", p)
43+
44+
ast.Equal(a.one, (p.one), "输入:%v", p)
45+
}
46+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# [658. Find K Closest Elements](https://leetcode.com/problems/find-k-closest-elements/)
2+
3+
## 题目
4+
5+
6+
## 解题思路
7+
8+
9+
## 总结
10+
11+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package Problem0658
2+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package Problem0658
2+
3+
import (
4+
"testing"
5+
"fmt"
6+
7+
"github.com/stretchr/testify/assert"
8+
)
9+
10+
type question struct {
11+
para
12+
ans
13+
}
14+
15+
// para 是参数
16+
// one 代表第一个参数
17+
type para struct {
18+
one string
19+
}
20+
21+
// ans 是答案
22+
// one 代表第一个答案
23+
type ans struct {
24+
one string
25+
}
26+
27+
func Test_Problem0658(t *testing.T) {
28+
ast := assert.New(t)
29+
30+
qs := []question{
31+
32+
question{
33+
para{""},
34+
ans{""},
35+
},
36+
37+
// 如需多个测试,可以复制上方元素。
38+
}
39+
40+
for _, q := range qs {
41+
a, p := q.ans, q.para
42+
fmt.Printf("~~%v~~\n", p)
43+
44+
ast.Equal(a.one, (p.one), "输入:%v", p)
45+
}
46+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# [659. Split Array into Consecutive Subsequences](https://leetcode.com/problems/split-array-into-consecutive-subsequences/)
2+
3+
## 题目
4+
5+
6+
## 解题思路
7+
8+
9+
## 总结
10+
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package Problem0659
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package Problem0659
2+
3+
import (
4+
"testing"
5+
"fmt"
6+
7+
"github.com/stretchr/testify/assert"
8+
)
9+
10+
type question struct {
11+
para
12+
ans
13+
}
14+
15+
// para 是参数
16+
// one 代表第一个参数
17+
type para struct {
18+
one string
19+
}
20+
21+
// ans 是答案
22+
// one 代表第一个答案
23+
type ans struct {
24+
one string
25+
}
26+
27+
func Test_Problem0659(t *testing.T) {
28+
ast := assert.New(t)
29+
30+
qs := []question{
31+
32+
question{
33+
para{""},
34+
ans{""},
35+
},
36+
37+
// 如需多个测试,可以复制上方元素。
38+
}
39+
40+
for _, q := range qs {
41+
a, p := q.ans, q.para
42+
fmt.Printf("~~%v~~\n", p)
43+
44+
ast.Equal(a.one, (p.one), "输入:%v", p)
45+
}
46+
}

Algorithms/0660.remove-9/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# [660. Remove 9](https://leetcode.com/problems/remove-9/)
2+
3+
## 题目
4+
5+
6+
## 解题思路
7+
8+
9+
## 总结
10+
11+

Algorithms/0660.remove-9/remove-9.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package Problem0660
2+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package Problem0660
2+
3+
import (
4+
"testing"
5+
"fmt"
6+
7+
"github.com/stretchr/testify/assert"
8+
)
9+
10+
type question struct {
11+
para
12+
ans
13+
}
14+
15+
// para 是参数
16+
// one 代表第一个参数
17+
type para struct {
18+
one string
19+
}
20+
21+
// ans 是答案
22+
// one 代表第一个答案
23+
type ans struct {
24+
one string
25+
}
26+
27+
func Test_Problem0660(t *testing.T) {
28+
ast := assert.New(t)
29+
30+
qs := []question{
31+
32+
question{
33+
para{""},
34+
ans{""},
35+
},
36+
37+
// 如需多个测试,可以复制上方元素。
38+
}
39+
40+
for _, q := range qs {
41+
a, p := q.ans, q.para
42+
fmt.Printf("~~%v~~\n", p)
43+
44+
ast.Equal(a.one, (p.one), "输入:%v", p)
45+
}
46+
}

0 commit comments

Comments
 (0)