How would you determine if a given 2D point lies inside a complex, non-convex polygon?
Implement point_in_polygon(point, polygon), where point is [x, y] and polygon is an ordered list of vertices forming a simple polygon. Return true only for points strictly inside; points outside, on an edge, or on a vertex return false. Example: point [2, 2] in square [[0, 0], [4, 0], [4, 4], [0, 4]] returns true; point [4, 2] returns false. Use integer coordinates with 3 <= len(polygon) <= 5000 and assume the polygon is non-self-intersecting.
def point_in_polygon(point, polygon):