NeetCode #919LC-2013MediumMath & GeometryNC 150NC 250
← Back to All Problems#919 · #2013 · Detect Squares(检测正方形)
📌 Problem Statement & Constraints
Design a class that stores points on the X-Y plane and answers, for a query point, how many axis-aligned squares can be formed using the query point and three previously added points. Duplicate points are allowed and count separately. Constraints:
1 <= point.length == 2, 0 <= xi, yi <= 1000, at most 5000 calls to add and count.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!