Unilog interview question

Write logic for merge sort and insertion sort.