mirror of
https://github.com/golang/go
synced 2024-09-30 03:24:39 -06:00
sort: use the builtin min function
This commit is contained in:
parent
009c628b4d
commit
c6fe3acc41
@ -415,13 +415,6 @@ func (d *testingData) Swap(i, j int) {
|
|||||||
d.data[i], d.data[j] = d.data[j], d.data[i]
|
d.data[i], d.data[j] = d.data[j], d.data[i]
|
||||||
}
|
}
|
||||||
|
|
||||||
func min(a, b int) int {
|
|
||||||
if a < b {
|
|
||||||
return a
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
func lg(n int) int {
|
func lg(n int) int {
|
||||||
i := 0
|
i := 0
|
||||||
for 1<<uint(i) < n {
|
for 1<<uint(i) < n {
|
||||||
|
Loading…
Reference in New Issue
Block a user