Leetcode Remove Duplicates From Sorted Array Intersection In Java