refine merge sort implementation (copy to new logic)
refine code
merge sort: only use O(n) memory
refine code