Golang | Leetcode Golang题解之第275题H指数II
题目:
题解:
func hIndex(citations []int) int {n := len(citations)return n - sort.Search(n, func(x int) bool { return citations[x] >= n-x })
}
题目:
题解:
func hIndex(citations []int) int {n := len(citations)return n - sort.Search(n, func(x int) bool { return citations[x] >= n-x })
}