Leetcode 593. Valid Square
Given four unordered 2D points, determine whether they form a valid square (four equal non-zero side lengths and four right angles). A common check is to analyze pairwise squared distances — there should be exactly two distinct distances with a 4:2 frequency ratio corresponding to equal sides and equal diagonals.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.