Back to Question

Number of Boomerangs

Question Explain

Given $n$ points in the plane, return the number of 'boomerangs'. A boomerang is a triplet of points $(i, j, k)$ such that the distance between $i$ and $j$ is equal to the distance between $i$ and $k$. Use a HashMap for counting distances.

Start Trying This Question Simulation

Click "Start Speaking" and answer the question naturally.