사랑 호스트에 따라 동작 관계를 프로그래밍하다.
length: = len (r)
if length < = 1 {
return r
}
num: = length/2
left: = merge sort (r [:num])
return merge (left, right)
}
funcmerge (left, right [] int) (result []; Len(left) & & R < Len(right) {
if left[l] < Right [r] {
result = append (result, Left [l])
l++
} else {
result = append (result, Right [r])
r++
}
result = append (result, left [l:] ...) <