You are given a two dimensional array points, where points[i] represents the coordinates of the point at index i on a Cartesian plane. You are also given a string s, where s[i] represents the character tag assigned to points[i].
A square is considered valid if:
It is axis aligned and centered at
No two points falling inside or on the perimeter of the square have the same character tag in s.
Return the maximum number of points that can be contained inside or on the perimeter of a valid square.
Note:
Points located on the boundary of the square are counted as being inside the square.
Constraints:
s.length, points.length
points[i].length
points[i][0], points[i][1]
s.length points.length
points consists of distinct coordinates.
s consists only of lowercase English letters.
You are given a two dimensional array points, where points[i] represents the coordinates of the point at index i on a Cartesian plane. You are also given a string s, where s[i] represents the character tag assigned to points[i].
A square is considered valid if:
It is axis aligned and centered at
No two points falling inside or on the perimeter of the square have the same character tag in s.
Return the maximum number of points that can be contained inside or on the perimeter of a valid square.
Note:
Points located on the boundary of the square are counted as being inside the square.
Constraints:
s.length, points.length
points[i].length
points[i][0], points[i][1]
s.length points.length
points consists of distinct coordinates.
s consists only of lowercase English letters.