The idea is quite simple. If there exists a line reflecting the points, then each pair of symmetric points will have their x coordinates adding up to the same value, including the pair with the maximum and minimum x coordinates. So, in the first pass, I iterate through the array, adding each point to the hash set, and keeping record of the minimum and maximum x coordinates. Then, in the second pass, I check for every point to the left of the reflecting line, if its symmetric point is in the point set or not. If all points pass the test, then there exists a reflecting line. Otherwise, not.

By the way, here, to hash the content of an array, rather than the reference value, I use **Arrays.hashCode(int[])** first, and then re-hash this hash code. You can also use **Arrays.toString(int[])** to first convey the 2d array to a string, and then hash the string. But the second method is slower.

```
public class Solution {
public boolean isReflected(int[][] points) {
HashSet<Integer> pointSet = new HashSet<>();
int sum;
int maxX, minX;
minX = Integer.MAX_VALUE;
maxX = Integer.MIN_VALUE;
for(int[] point:points) {
maxX = Math.max(maxX, point[ 0 ]);
minX = Math.min(minX, point[ 0 ]);
pointSet.add(Arrays.hashCode(point));
}
sum = maxX+minX;
for(int[] point:points) {
if(!pointSet.contains(Arrays.hashCode(new int[]{sum-point[ 0 ], point[ 1 ]}))) {
return false;
}
}
return true;
}
}
```