Search
⌘K

Leetcode 447. Number of Boomerangs

Count ordered tuples (i, j, k) of distinct 2D points where j and k are equidistant from i; for each point build a frequency map of squared distances to others and sum m*(m-1) over each distance group (O(n^2) time).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.