mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-06 17:44:10 +08:00
edit mainFunc name
This commit is contained in:
@ -2,8 +2,8 @@ package leetcode
|
||||
|
||||
import "sort"
|
||||
|
||||
// SmallestRangeII ...
|
||||
func SmallestRangeII(A []int, K int) int {
|
||||
// smallestRangeII ...
|
||||
func smallestRangeII(A []int, K int) int {
|
||||
n := len(A)
|
||||
sort.Ints(A)
|
||||
var ans int = A[n-1] - A[0]
|
||||
|
@ -42,7 +42,7 @@ func Test_Problem910(t *testing.T) {
|
||||
|
||||
for _, q := range qs {
|
||||
_, p := q.ans910, q.para910
|
||||
fmt.Printf("【input】:%v 【output】:%v\n", p, SmallestRangeII(p.A, p.K))
|
||||
fmt.Printf("【input】:%v 【output】:%v\n", p, smallestRangeII(p.A, p.K))
|
||||
}
|
||||
fmt.Printf("\n\n\n")
|
||||
}
|
||||
|
Reference in New Issue
Block a user