refactor merge two arrays function
Implement merge sort
Add merge sort unit tests