Google interview question

Merge sort and other variations on it