GlobalLogic interview question

java collections, merge sort algorithm and a puzzle