Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 460 Bytes

problem_236.md

File metadata and controls

7 lines (5 loc) · 460 Bytes

Transcribing a high-level solution I found

  1. Draw a horizontal line to the right of each point and extend it to infinity
  2. Count the number of times the line intersects with polygon edges.
  3. A point is inside the polygon if either count of intersections is odd or point lies on an edge of polygon. If none of the conditions is true, then point lies outside.

Source