In this post, we discuss how to check if a given point is inside a convex polygon using the Graham scan algorithm and list application areas for the solution.
Table of contents:
Problem StatementGraham scan algorithmApproach to solve the problemTime and Space Complexity AnalysisApplications
Prerequisite: Graham scan algorithm
Problem Statement
Problem statement: Given coordinates of n points of a convex polygon. Return true if the point (x, y) lies inside the polygon, false otherwise.
Inpu...
Published on November 27, 2021 07:53