Skip to content

Commit a9be35d

Browse files
committed
add: leetcode 0807 test
1 parent 7c0d843 commit a9be35d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package leetcode
2+
3+
import (
4+
"fmt"
5+
"testing"
6+
)
7+
8+
type question807 struct {
9+
para807
10+
ans807
11+
}
12+
13+
// para 是参数
14+
type para807 struct {
15+
grid [][]int
16+
}
17+
18+
// ans 是答案
19+
type ans807 struct {
20+
ans int
21+
}
22+
23+
func Test_Problem807(t *testing.T) {
24+
25+
qs := []question807{
26+
27+
{
28+
para807{[][]int{{3, 0, 8, 4}, {2, 4, 5, 7}, {9, 2, 6, 3}, {0, 3, 1, 0}}},
29+
ans807{35},
30+
},
31+
32+
{
33+
para807{[][]int{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}},
34+
ans807{0},
35+
},
36+
}
37+
38+
fmt.Printf("------------------------Leetcode Problem 807------------------------\n")
39+
40+
for _, q := range qs {
41+
_, p := q.ans807, q.para807
42+
fmt.Printf("【input】:%v 【output】:%v\n", p.grid, maxIncreaseKeepingSkyline(p.grid))
43+
}
44+
fmt.Printf("\n\n\n")
45+
}

0 commit comments

Comments
 (0)