Count Number of Squares From a Set of Points (Follow-up)
Asked at Pure Storage · Coding Questions · Difficulty: Hard · Last asked Jul 15, 2026
Given a set of integer-coordinate points `P` in 2D (no duplicates), compute how many **distinct squares** can be formed using points from `P` as vertices. Rotation is allowed (not necessarily axis-aligned).
Loading the problem…