American Express interview question

Write JAVA code for merge sort