#3143
Maximum Points Inside the Square
expert · 1030 · lc medium +32 · 39.2% accepted · 170 likes · top 18%
Description
Given a 2D point array points and a tag string s (where s[i] is the tag of point i), a valid square is axis-aligned, centered at the origin, and contains no two points with the same tag. Points on the boundary count as inside. Return the maximum number of points in any valid square.
Code
1
2
3