You are provided with an array, points, an integer angle, and your location, where points[i] = [xi, yi] and location = [posx, posy], both representing
You initially face directly east from your fixed location and cannot move. In other words, posx and posy cannot be changed. However, you can rotate to adjust your viewing direction. Your field of view, measured in degrees, is specified by the angle, representing the width of visibility. If you rotate counterclockwise by an angle
Note: The following slide deck illustrates the observer’s
location,angle, observer’s rotation, and the corresponding fields of view.
A set of points is visible to you if, for each point, the angle formed by the point, your position, and the immediate east direction from your position falls within your field of view.
There can be multiple points at one coordinate. There may be points at your location, and you can always see these points regardless of your rotation. Points do not obstruct your vision to other points.
Return the maximum number of points you can see.
Constraints:
points.length
points[i].length
location.length
angle
posx posy xi yi
You are provided with an array, points, an integer angle, and your location, where points[i] = [xi, yi] and location = [posx, posy], both representing
You initially face directly east from your fixed location and cannot move. In other words, posx and posy cannot be changed. However, you can rotate to adjust your viewing direction. Your field of view, measured in degrees, is specified by the angle, representing the width of visibility. If you rotate counterclockwise by an angle
Note: The following slide deck illustrates the observer’s
location,angle, observer’s rotation, and the corresponding fields of view.
A set of points is visible to you if, for each point, the angle formed by the point, your position, and the immediate east direction from your position falls within your field of view.
There can be multiple points at one coordinate. There may be points at your location, and you can always see these points regardless of your rotation. Points do not obstruct your vision to other points.
Return the maximum number of points you can see.
Constraints:
points.length
points[i].length
location.length
angle
posx posy xi yi