Back to QuestionsPractice with This Question
Number of Boomerangs
37.1K views•Asked at Apple•
Medium
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
Practice answering orally or with text to get instant AI feedback.