Junior — Middle+
Determining the presence of a vertical axis of symmetry for a set of points
livecode
Task condition
Given an array of points, each defined by integer coordinates (x, y). It is required to determine whether there exists a vertical line such that all points not lying directly on this line can be divided into two groups, which are mirror reflections of each other with respect to the found line. The groups are considered mirror images if each point from the original array has exactly one corresponding point in the other group, located at the same distance from the axis but with the opposite sign in the x-coordinate.