合并两个数组排序:
*先合并之后然后排序:
*
func Merge(nums1 []int, m int, nums2 []int, n int) {
nums1 = nums1[:m]
nums2 = nums2[:n]
nums1 = append(nums1,nums2...)
text1(nums1)
}
func text1(a[]int) {
var mix_index int
for i := 0; i < len(a)-1; i++ {
mix_index = i
for j := i + 1; j < len(a); j++ {
if a[i] > a[j] {
mix_index = j
a[mix_index], a[i] = a[i], a[mix_index]
}
}
}
fmt.Println(a)
}