golang 实现二分查找、插入排序、冒泡排序、选择排序
二分查找// 二分func binarySearch(list []int, key int) int { low, high := 0, len(list)-1 for low <= high { mid := (low + high) / 2 if key < list[mid] { high = mid - 1 continue } if key > list[mid] { low = mid + 1 continue }