0447. Number of Boomerangs
https://leetcode.com/problems/number-of-boomerangs
Description
You are given n
points
in the plane that are all distinct, where points[i] = [xi, yi]
. A boomerang is a tuple of points (i, j, k)
such that the distance between i
and j
equals the distance between i
and k
(the order of the tuple matters).
Return the number of boomerangs.
Example 1:
Example 2:
Example 3:
Constraints:
n == points.length
1 <= n <= 500
points[i].length == 2
-104 <= xi, yi <= 104
All the points are unique.
ac
Last updated