continue on MergingIterator and figure it out Iterator Comparator will not work, since the cursor position cannot be reset. Check in the solution anyway. Also create a new package comparator.