规范格式

This commit is contained in:
YDZ
2020-08-07 15:50:06 +08:00
parent 854a339abc
commit 4e11f4028a
1438 changed files with 907 additions and 924 deletions

View File

@ -0,0 +1,15 @@
package leetcode
import (
"fmt"
"testing"
)
func Test_Problem1157(t *testing.T) {
arr := []int{1, 1, 2, 2, 1, 1}
obj := Constructor1157(arr)
fmt.Printf("obj = %v\n", obj)
fmt.Printf("query(0,5,4) = %v\n", obj.Query(0, 5, 4)) //1
fmt.Printf("query(0,3,3) = %v\n", obj.Query(0, 3, 3)) //-1
fmt.Printf("query(2,3,2) = %v\n", obj.Query(2, 3, 2)) //2
}