LeetCode – Line Reflection (Java)
Given n points on a 2D plane, find if there is such a line parallel to y-axis that reflects the given points. Example 1: Given points = [[1,1],[-1,1]], return true. Example 2: Given points = [[1,1],[-1,-1]], return false. Follow up: Could you do better than O(n2)? Java Solution For this problem, we first find the … Read more