Solved MergeTwoSortedLists in java