Unilog Interview Question

Write logic for merge sort and insertion sort.