




Sponsored
Use these hints if you're stuck. Try solving on your own first.
Sort the points by polar angle with the original position. Now only a consecutive collection of points would be visible from any coordinate.
We can use two pointers to keep track of visible points for each start point
For handling the cyclic condition, it’d be helpful to append the point list to itself after sorting.