3143. Maximum Points Inside the Square
You are given a 2D array
points
and a strings
where,points[i]
represents the coordinates of pointi
, ands[i]
represents the tag of pointi
.A valid square is a square centered at the origin
(0, 0)
, has edges parallel to the axes, and does not contain two points with the same tag.Return the maximum number of points contained in a valid square.
Note:
- A point is considered to be inside the square if it lies on or within the square’s boundaries.
- The side length of the square can be zero.
1 | class Solution { |