LeetCode Solution, Medium, 287. Find the Duplicate Number