First Duplicate Value Leetcode Solutions In Java