c4sh4 / CheckPoints

Belonging of a point to a convex polygon.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CheckPoints

Belonging of a set of points to a convex polygon.

Given a convex polygon with N vertices.
The vertices are set in counterclockwise traversal order.
Also, a set of K points is received at the input, and for each of them it is required to determine whether it lies inside this polygon or not.
The boundaries of the polygon are included.
The preprocessing of the polygon will be performed in O(N).
The running time of the algorithm is O(Klog n). The total operating time is O(N + KlogN).

About

Belonging of a point to a convex polygon.


Languages

Language:C++ 97.4%Language:CMake 2.6%